Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Shell Script - help
Name: Samuel R Ragunaat Date: July 10, 2003 at 06:09:02 Pacific OS: Linux CPU/Ram: AMD
Comment:
hi, I want to write a shell script which will execute some commnds in the script and create a resulted variable with all the results. e.g. ----------------- #!/bin/bash year = 'date +%Y' month = 'date +%M'
echo $year echo $month
MY = $year_$month echo MY
actually i expected $year to give "2003" It's not working ...:(
Name: David Perry Date: July 10, 2003 at 12:56:21 Pacific
Reply:
You cannot have spaces between the variable name, the equals sign or the equals sign and the value. You need back tick marks and not single quotes around the date portion.
Summary: i need help with a shell script that passes a variable. why does this not work?: echo $`echo 1` i want this to produce the same result as echo $1 but instead of the first option given at the command...
Summary: Im starting to learn bash. i lvoe it. im trying to do something but want the easy way arround. I made this script: #!/bin/bash #Author = MrJake # #Desc = will display a chmod list # # #Created on Mon ...
Summary: hi guys, i really need some help asap. Im taking an OS class and we barely skimmed over Linux. We were asked a homework question that for the life of me i have no idea how to do. the qestion is... wri...