![]() |
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 |
| String substitution on find results inside exec/xargs | myndcraft | Shell Programming and Scripting | 2 | 05-17-2008 02:36 PM |
| Problem using find and xargs | quixote | Shell Programming and Scripting | 5 | 05-02-2008 10:24 PM |
| command usage on find with xargs and tar | darkrainbow | AIX | 3 | 12-25-2007 06:25 PM |
| strange behavior of find with xargs | jerardfjay | Shell Programming and Scripting | 9 | 08-09-2007 08:06 AM |
| xargs | jpprial | UNIX for Dummies Questions & Answers | 4 | 09-17-2001 08:29 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
find | xargs cat
Hai I just want to find a file *.txt in particular direcotry and display the file name puls the content. Do someone know hot to do this, thanks.
I try : find test/ -name '*.txt' | xargs cat but It does'nt print out the file name, i want something below print out in my screen : test/1.txt this is content of 1.txt test/2.txt this is content of 2.txt ... so on instead of : this is content of 1.txt this is content of 2.txt ... so on, which is what my previous script does. Thanks for your help |
|
||||
|
thx
Thanks, it really works. but when I want to put in standard output it takes a very slow processing.
Do u know other way using sed or awk ? since I want to print other thing after the file name and save in standard ouput e.g: test/1.txt new text at beginning content of 1.txt new text at ending test/2.txt new text at beginning content of 2.txt new text at ending the new text at beginning and new text at ending will be the same for every file. Last edited by asal_email; 03-15-2005 at 04:54 AM.. Reason: what is -1000000 for ? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|