![]() |
|
|
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 |
| Please can any one explain this ${0##/} | gadege | Shell Programming and Scripting | 2 | 04-01-2008 04:26 PM |
| please explain this | dummy_needhelp | Shell Programming and Scripting | 2 | 10-15-2007 02:17 AM |
| Can anyone explain plz | r_W213 | UNIX for Advanced & Expert Users | 3 | 03-27-2007 05:52 AM |
| if [ $? -eq 0 ] .. can someone explain this? | ranjita.c | Shell Programming and Scripting | 5 | 10-03-2006 08:50 PM |
| Explain awk | hitmansilentass | Shell Programming and Scripting | 4 | 09-27-2006 03:14 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
please explain the below
could u please convert the below statement to shell script
---------- logdir=/smp/dyn/logfiles/cpm/pgm/pgIm $logdir = $logdir ."/pgIm${toDate}*"; ---- could u please explain the below clearly grep -i adding $logdir | grep -iv equation | awk '{print \$NF}' | sort -u | sed -e 's/\.\$//' > /tmp/t1 |
|
||||
|
grep -i adding $logdir | grep -iv equation | awk '{print \$NF}' | sort -u | sed -e 's/\.\$//' > /tmp/t1
Looks like to me this is searching for lines of data in the $logdir that contain the word "adding" but does not contain the word "equation" then awk it searching those results for the number of fields, sort, sorts then and sed is looking to remove any \. or $ from that data, then its all getting written to a file in /tmp I could be wrong though, I just started scripting a month ago ![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|