![]() |
|
|
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 |
| Search text from a file and print text and one previous line too | kamranjalal | Shell Programming and Scripting | 6 | 01-06-2009 03:27 AM |
| Print previous, current and next line using sed | ysrinu | Shell Programming and Scripting | 8 | 12-08-2008 04:05 PM |
| Seeing previous command | JackieChan | UNIX for Dummies Questions & Answers | 4 | 06-02-2006 10:35 AM |
| what do one mean when referring to 'platforms'? | ninelives1980 | UNIX for Dummies Questions & Answers | 1 | 04-21-2005 01:18 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Referring from the print of the previous command
Hi,
I am a newbie in SHell Programming. I want to ask something about referring the result of the previous command in Shell-Prog. For example : bnm@dsds~> ifconfig eth0 Link encap:Ethernet HWaddr 00:0B:CD:85:A5:8A inet addr:192.168.0.2 Bcast:192.168.0.225 Mask 255.255.255.0 bnm@dsds~> next command ??? My question is : What should i type as the next command ??? using the if-statement below : -------------- if [ HWaddr is equal to 00:0B:CD:85:A5 ]; then ..... fi -------------- so that it will refer to the HWaddr 00:0B:CD:85:A5 printed as the result of the previous command ? Thanks in advance. Bob |
|
||||
|
Other Ways
Quote:
Could i know the other ways, please ? since i am avoiding writing the result into a file. Then, what does "cut -d "" -f 5" mean ? ![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|