var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: extract variable text from file and push to command
I need to get the contents of a text file into an executable command.
The text file might read:
I need the command to read
softwareupdate -i iCal-1.5.2 iSync-1.4 iTunes4-4.2 etc ...
I can do it quite manually but need a script that will execute no matter how many entries are in the text file (there might be 1 or 20). The text of the file would vary each time also (different installs).
A possible solution :
cat text_file | xargs softwareupdate -i
have never used the xargs command but it works a treat. At this stage I just needed the command to print not execute as I'm sitting on Linux and it needs to run on OS X. I modified it to read:
Installs=`cat /tmp/temp.txt | xargs echo`
echo "softwareupdate -i $Installs"
Much appreciate that as it was driving me batty !!