10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I entered the following <zzz.list xargs showtell |more which does a echo "<<<<<<<<<<<<<<<<<<<<<<<<< $1 >>>>>>>>>>>>>>>>>>"
head -20 $1 The file zzz.list contains 525 lines representing user scripts (1 per line), but only the first, 181st, and 399th lines were processed. What am I missing?
TIA (2 Replies)
Discussion started by: wbport
2 Replies
2. Shell Programming and Scripting
In a directory I have two lists, all files which could contain certain fields (they all share copied code) and a list of fields. My two scripts are
<appl.list xargs grep $1
where appl.list contains files (source programs) with the fields. This script is named YY
<fields.list xargs YY
... (4 Replies)
Discussion started by: wbport
4 Replies
3. Shell Programming and Scripting
I am trying to call xargs, however rm is complaining
find . -maxdepth 1 -name "*tests*" -print0 | xargs -0 rm
rm: missing operand
Try `rm --help' for more information. (3 Replies)
Discussion started by: kristinu
3 Replies
4. 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
5. Shell Programming and Scripting
I have a file and need to only select users that have a shell of “/bin/bash” in the line using awk or sed please help (4 Replies)
Discussion started by: boyboy1212
4 Replies
6. Shell Programming and Scripting
Hi
From the xargs man page (Solaris):
ls $1 | xargs -I {} -t mv $1/{} $2/{}
This would move all the files in directory $1 to directory $2
Problem 1:
In a shell script if I want to move files in d1 to d2
dir1=~/d1
dir2=~/d2
ls $dir1 | xargs -I {} -t mv $dir1/{} $dir2/{}
does not... (3 Replies)
Discussion started by: encrypted
3 Replies
7. Shell Programming and Scripting
I have been reading for a few hours trying to educate myself enough to accomplish this task, so please know I have performed some research. Unfortunately, I am not a *NIX scripting expert, or a coder. I come from a network background instead.
SO, here is my desired outcome. I have some Cisco... (5 Replies)
Discussion started by: abbzer0
5 Replies
8. UNIX for Dummies Questions & Answers
Hello All,
I'm trying the following:find . -name "*" -exec grep -ln "IsAlpha" {} \;
It gives me file names only (having string "IsAlpha"), I want to get line numbers also, something like this: test 1: Line 52
test 1: Line 95 etc
Is it possible to obtain using grep & find only. (5 Replies)
Discussion started by: nervous
5 Replies
9. UNIX for Dummies Questions & Answers
Dear all,
I have to calculate sum of record count of files of the specified directory.
First I tried the following way which prints one or more outputs.
How can I sum of this output?
find /home/work/tmp/1/O/ -type f -print0 | xargs -0 wc -l | grep total
1666288 total
1073908 total
... (4 Replies)
Discussion started by: mr_bold
4 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