7 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am running a script under ubuntu 16.04
I have no problem with the script. My question is general algorithm of for file command.
I just need to know how for file in *.txt process works.
Let's say, I wish to run the script by sorting filename:
for file in *.txt
"do something in... (2 Replies)
Discussion started by: baris35
2. Shell Programming and Scripting
Hi, i have a problem with a sed command runned in a for cycle...
I have a file named fileX which contains (i have crippled the line to minimal for easy):
load data dbfoo - TOCHANGE - comment
load data dbboo - TOCHANGE - comment
load data dbzoo - TOCHANGE - comment
And a file... (8 Replies)
Discussion started by: maxlamax
3. Shell Programming and Scripting
i have a question how to modify below script to generate the expect result below :
for ((i=0; i < 25; i++))
200901018 (2 Replies)
Discussion started by: bleach8578
4. Shell Programming and Scripting
I have a question:
is there a way to have a "for" cycle done a certain number of times. For example in c++ I can do this:
and the cycle will be repeated 10 times.
in UNIX for example I do this:
for i in `cat /etc/host` do done
and the cycle will be repeated... (6 Replies)
Discussion started by: jcpetela
5. Shell Programming and Scripting
I need help on putting a wildcard match inside an if condition (I'm using korn shell):
then echo ' '
echo ''$MYSEL' is not a correct option'
echo ' '
i tried also #if -ne "``" and a lot of combinations of `"' but I didn't find the... (2 Replies)
Discussion started by: elionba82
6. Shell Programming and Scripting
I have files in a dir.
I what to create a FOR cycle that will do this
FOR <condition> do
file=`ls <directory> | tail -1`
mv -f $file <another dir>
What I want to now is what should I put in the <condition>. The condition I want is that the FOR will execute... (3 Replies)
Discussion started by: nagomes
7. Shell Programming and Scripting
I got a cycle in the script which open another scripts.
Scripts action will be running 2 times at the same time.
Inside of action() is insert into the table.
But what I want is that only first script can do insert into table.
So how to do... (2 Replies)
Discussion started by: mape