10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, I need some help with xargs
$ ls
aaa bbb ccc ddd$ ls | xargs -I{} ls -la {}
-rw-rw-r--. 1 xxx xx 0 May 30 20:04 aaa
-rw-rw-r--. 1 xxx xx 0 May 30 20:04 bbb
-rw-rw-r--. 1 xxx xx 0 May 30 20:04 ccc
-rw-rw-r--. 1 xxx xx 0 May 30 20:04 dddit's possible to have output like this with... (3 Replies)
Discussion started by: vikus
3 Replies
2. UNIX for Dummies Questions & Answers
How can I recursively find all files in a directory and print out the file and first line number of any text blocks that match the below cases?
This would seem to involve find, xargs, *grep, regex, etc.
In summary, I want to find so-called empty "try-catch blocks" that do not contain code... (0 Replies)
Discussion started by: lifechamp
0 Replies
3. Shell Programming and Scripting
Hello,
I'm interested in finding all occurrences of the terms in file1 in file2, which are both csv files. I can do this with a loop but I'm interested in knowing if I can also do it with the help of xargs and grep. What I have tried:
cat file1 | xargs grep file2
The problem is that... (15 Replies)
Discussion started by: eon
15 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I am a unix noob. Need some basic help. I have tried using google, but not able to figure this out.
Here are the scenarios:
1. How do I find a directory with a particular name, say "Merlin" in the entire file system? I tried :
find / -type d -name "dir_name"
The problem is I'm... (3 Replies)
Discussion started by: neil.k
3 Replies
5. Shell Programming and Scripting
hi
Could any one please tell me the option using which we can run multiple commands using xargs
I have list of files, I want to run dos2unix and chmod at one shot on them
I tried google n searched man pages but couldnt really find the solution , please help
right now im doing this
ls... (4 Replies)
Discussion started by: sunilmenhdiratt
4 Replies
6. Shell Programming and Scripting
Folks
I've been struggling this with for far too liong now and need your help!
I've been happily using grep for a search of a directory, to list the files which contain a string:
find . -type f -mtime -5 -print | xargs grep -l 'invoiceID=\"12345\"'
Now the list of 'invoiceID' I am... (4 Replies)
Discussion started by: daveaasmith
4 Replies
7. Shell Programming and Scripting
hi
i just want to know that how do we use xargs command to find files which are greater than specified memory
in a given directory (6 Replies)
Discussion started by: sumit the cool
6 Replies
8. UNIX for Dummies Questions & Answers
Dear all,
I have tried the following 2 lines
xargs -t -i -exec grep -i -w {} file_1 >>test < file_2
cat -s file_2| xargs -t -i -exec grep -i -w {} file_1 >> test
They were meant to search for the contents of file_2 in file_1 and write the respective lines of file_1 into file "test" .... (15 Replies)
Discussion started by: Bruno
15 Replies
9. Shell Programming and Scripting
hi ,
can anyone help me by saying why we use xargs.. is it acing like a place holder..?
thanks,
Krips. (3 Replies)
Discussion started by: kripssmart
3 Replies
10. Shell Programming and Scripting
guys... I wanna use xargs in such a way that i can use it in grepping the fileds..
something like this:
grep -p <xargs values> *
lemme know how to do this.. (5 Replies)
Discussion started by: freakygs
5 Replies