![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sql output into a variable | purplebirky | Shell Programming and Scripting | 3 | 09-09-2009 11:56 AM |
| awk output in a variable | andaluzia | Shell Programming and Scripting | 5 | 04-01-2009 04:45 PM |
| AWK Output into a variable | mace_560 | Shell Programming and Scripting | 2 | 12-30-2008 04:58 AM |
| Set a variable from awk output | Cranie | UNIX for Dummies Questions & Answers | 3 | 10-11-2007 09:39 AM |
| how to output awk to a variable | bashirpopal | UNIX for Dummies Questions & Answers | 4 | 04-02-2003 11:02 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
rediret output to variable...
Hi i have a problem in redirecting the ouput to a variable.I want to use that variable in the script itself.
here is my problem... unique.out "UNIX" | grep Encrypted | awk '{FS=" "} {print $2}' . unique.out is and executable file that generates uniqe id WITH THE FOLLOWING FORMAT. Using Key ..... Trying to Encrypt UNIX ...... Uniqe Code: 123232312434, lenght 32" AND also i not able to take out of that coma( ,)from the uniqeid. please help me to remove that comma from the output and put that output in a varaible. please help me on this issue. Thanks in advance... . |
|
||||
|
Check man page or usage document of the command. It should have option to output the code only (in fact, it should be the default). If not, the person who wrote the program doesn't understand Unix.
In case of the latter situation, do Code:
awk -F'[:, ]' '/Uniqe Code:/{print $4}'
Code:
awk '/Uniqe Code:/{sub(",", "", $2);print $2}'
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|