10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is there a way I can specify the name of a list as an argument to a shell script and then use the values of that list name in the script?
I need to do this WITHOUT using case statements.
Something like this:
check.sh list1
#!/bin/bash
list1="www.amazon.com www.google.com"... (9 Replies)
Discussion started by: gctaylor
9 Replies
2. Shell Programming and Scripting
Hi Team,
Here's the situation.
I have approximately 300000 to 500000 jpg files in /appl/abcd/work_dir
mv /appl/abcd/work_dir /appl/abcd/process_dir
The above move command will work if the jpg files count is close to 50000 (not sure). If the count is less this mv command holds good. But if... (14 Replies)
Discussion started by: kmanivan82
14 Replies
3. UNIX for Advanced & Expert Users
Hi all,
I am using GNU sed (named gsed under macports) in OSX. I have a directory with a series of files named pool_01.jpg through pool_78802.jpg. I am trying to use this command to rename the files to their checksum + extension.
md5sum * | gsed -e 's/\(*\) \(.*\(\..*\)\)$/mv -v \2 \1\3/e'
... (3 Replies)
Discussion started by: openthomas
3 Replies
4. Shell Programming and Scripting
Hi I am using find command --
find "directory1" -type f | xargs -i mv {} "directory2"
to avoid above argument list too long problem.
But, issue i am facing is directory1 is having subdirectories due to this i am facing directory traversal problem as i dont want to traverse subdirectories... (9 Replies)
Discussion started by: VSom007
9 Replies
5. Shell Programming and Scripting
consider the script below
sh /opt/hqe/hqapi1-client-5.0.0/bin/hqapi.sh alert list --host=localhost --port=7443 --user=hqadmin --password=hqadmin --secure=true >/tmp/alerts.xml
awk -F'' '{for(i=1;i<=NF;i++){
if($i=="Alert id") {
if(id!="")
if(dt!=""){
cmd="sh someScript.sh... (2 Replies)
Discussion started by: vivek d r
2 Replies
6. Shell Programming and Scripting
Hi,
i am having some trouble with the below command, can some one suggest me the better way to do it.
grep -l 'ReturnCode=1' `find $Log -newer /tmp/Failed.tmp -print | xargs ls -ld | egrep SUB | egrep -ve 'MTP' -ve 'ABC' -ve 'DEF' -ve 'JKL' -ve 'XYZ' | awk '{print $9}'` > $Home1
Its... (2 Replies)
Discussion started by: Prateek007
2 Replies
7. Shell Programming and Scripting
Dear Experts,
I have a list of 10K files in a directory. I am not able to execute any commands lile ls -lrt, awk, sed, mv, etc........
I wanna execute below command and get the output. How can I achieve it?? Pls help.
root# awk -F'|' '$1 == 1' file_20120710* | wc -l
/bin/awk: Argument list... (2 Replies)
Discussion started by: Naga06
2 Replies
8. Shell Programming and Scripting
I have a wrote a script which consits of the below line.. Below of this script I'm getting this error "ksh: /usr/bin/ls: arg list too long"
The line is
log_file_time=`ssh -i $HOME/.ssh/id_rsa -q $i ls -lrt /bp/karthik/test/data/log/$abc*|tail -1|awk '{print $8}'`
And $abc alias is as "p |... (1 Reply)
Discussion started by: 22karthikreddy
1 Replies
9. UNIX for Dummies Questions & Answers
Hi
I executed the code
for file in `ls pdb*.ent`
do
new_name=`echo $file | sed 's/^pdb//;s/.ent/.txt/'`
mv $file $new_name
done
Its giving error at ' ls pdb*.ent' argument list too long
i have around 150000 entries
please help
Thank you (6 Replies)
Discussion started by: empyrean
6 Replies
10. Shell Programming and Scripting
Hi,
I'm using bash and ksh93 compatible derivatives.
In a recent getopts experience, I found myself spending far too much
time on this little problem. I hope someone can help...
So here's the deal.
I want to build have a command line interface that accepts either zero,
one, or... (4 Replies)
Discussion started by: duderonomy
4 Replies