![]() |
|
|
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 |
| xargs problem | encrypted | Shell Programming and Scripting | 3 | 05-16-2009 01:15 PM |
| problem with grep in combination with xargs | Bruno | UNIX for Dummies Questions & Answers | 15 | 01-08-2009 10:50 AM |
| querry about xargs command | mobydick | UNIX for Dummies Questions & Answers | 1 | 05-29-2008 02:55 AM |
| Problem using find and xargs | quixote | Shell Programming and Scripting | 5 | 05-02-2008 11:24 PM |
| use of xargs command | kishorebabu | UNIX for Dummies Questions & Answers | 5 | 10-30-2003 02:53 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
xargs command problem
Hi I am trying to use "xargs" command to loop through each file, modify it and overwrite the old file with the modification but with the same file name. I thought it is easy but I just can't get it to work I tried the following I thought {} would give me the current file name, but it doesn't. It just create a file with name '{}' Any idea? Code:
ls ./Client*log | xargs nawk '{
if(match($3,/\^/){
print substr($3, 2, length($3)-2)
}
}' > ./temp | xargs mv ./temp {}
Thanks in advance for your help |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|