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 variables
Name: pbekal Date: December 8, 2005 at 06:56:43 Pacific OS: Unix CPU/Ram: Risc
Comment:
When I put the output of a command into a variable the leading spaces are lost. Below shows the shell b.sh with the variable "a" where the leading spaces are lost. In the second instance doing the same command on the command prompt show the leading spaces. How can I have the leading spaces saved in the variable in the shell. > more b.sh a=`bdf|grep /orpsoft/data001/oradata/PSTISPRD` echo $a
Summary: I need some help of how to use shell variable in awk '{action}' section? Tried several way doesn't seem to be get it right. Thanks in advance. dkr ...
Summary: great. i was wondering if there was syntax similar to the " -v awkvar="$shellvar" " method for inputting shell variableds, but the file output solution works perfect for what i want. thanks. ...
Summary: I am running in bourne shell and trying to pass a varaible assigned in a read loop. Outside the loop, the value is lost. Here is the simple code where I create a file, read it, assign a varable and ...