![]() |
|
|
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 |
| how to modify a file using shell script | syamkp | Shell Programming and Scripting | 1 | 03-07-2008 12:16 PM |
| variables in shell | viko | Shell Programming and Scripting | 2 | 03-03-2008 11:09 PM |
| How to modify an existing pdf with unix shell commands | fandwick | UNIX for Advanced & Expert Users | 3 | 06-08-2007 11:28 AM |
| Using shell variables In awk | nortypig | Shell Programming and Scripting | 11 | 08-24-2006 01:48 AM |
| Is it possible in a shell script to modify itself ?? | sehgalniraj | Shell Programming and Scripting | 5 | 03-23-2005 12:21 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Modify shell variables with AWK
Dear Folks, I have a command output something like: Quote:
Code:
PIN=`gsmctl -d /dev/ttyS0 pin sig | awk '/PIN0/ { print $2}'`
SIG=`gsmctl -d /dev/ttyS0 pin sig | awk '/SIG0/ { print $2}'`
It's possible to modify two shell variables only calling one time to AWK? Perhaps defining two shell variables and modifying in a AWK block.. thanks!! Regards, |
|
||||
|
fpmurphy, thanks for your reply ;-)
I want to use only one script/file.. using awk -f I need at least two files, is there any solution to make this only with one script? perhaps using another way instead of awk? Thanks!! Regards, |
|
||||
|
Quote:
Code:
gsmctl -d /dev/ttyS0 pin s | xargs | read X PIN Y SIG echo $PIN echo $SIG |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|