Search Results

Search: Posts Made By: littlejon
7,986
Posted By littlejon
How to build a command into a string rather than execute the command
I'm trying to populate a command line into a variable. It appears to be executing, instead. Here's an example:

mycmd=''
if ...; then
$mycmd='sudo '
fi
$mycmd=$mycmd 'sed -i prev s/aaa/bbb/'...
21,898
Posted By littlejon
Thanks, jerardfjay. Your post must have just made...
Thanks, jerardfjay. Your post must have just made it while I was typing my last one. I think I've got the problem solved. I appreciate your suggestion, though. littlejon.
21,898
Posted By littlejon
Thanks to both Ygor and Aigles. I went with...
Thanks to both Ygor and Aigles. I went with Aigles' suggestion and it worked like a charm. Of course, I tweaked it to meet my needs. I was originally trying to use standard programming techniques to...
21,898
Posted By littlejon
script to run shell command and insert results to existing xml file
Hi. Thanks for any help with this. I'm not new to programming but I am new to shell programming. I need a script that will

1. execute 'df -k' and return the volume names with specific text
2....
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 11:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy