MacMason Posted October 23, 2020 Share Posted October 23, 2020 To start off I'm still learning Bash, so the answer may be very simple (I'm hoping that is gap in my education) I have a very helpful bash script that I used to remove malware from customer's Macs. The script works great. However when attempted to convert the script to DuckyScript I noted that the "~" does not show up in the terminal window, sending the command to the wrong folder. QUACK STRING ls ~/Library/LaunchAgents/ >> $lootdir/LaunchAgentsUSER.txt My question is there a better way to write this? Link to comment Share on other sites More sharing options...
chrizree Posted October 23, 2020 Share Posted October 23, 2020 Have you tried to wrap the string with quotes? I.e. "~/Library/LaunchAgents/ >> $lootdir/LaunchAgentsUSER.txt" or... escaping the special character \~/Library/LaunchAgents/ >> $lootdir/LaunchAgentsUSER.txt Link to comment Share on other sites More sharing options...
MacMason Posted October 24, 2020 Author Share Posted October 24, 2020 I was under the impression that the quotes would be sent to the terminal ? (Not saying that My impression is correct). This is something I'm going to try! Thank you very much and I will post the results of your suggestion. Link to comment Share on other sites More sharing options...
MacMason Posted October 24, 2020 Author Share Posted October 24, 2020 Thanks the Quotes worked!!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.