10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I've written a script to automate encoding of all the MP4 files in a directory (incl. subdirectories). But unfortunately it's running for the first MP4 file only.
My machine details:
root@Ubuntu16:~# uname -a
Linux Ubuntu16 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48... (2 Replies)
Discussion started by: prvnrk
2 Replies
2. UNIX for Advanced & Expert Users
Good morning,
At the client location
os is CentOS. In all the terminals i.e F1, F2, F3....F10 PING command is continuously running. I tried to terminate it using CTRL C or quit but unable to stop that command in all the terminals. How to stop that? Howto find batch files which are being... (3 Replies)
Discussion started by: sureshbabu.anis
3 Replies
3. Shell Programming and Scripting
Hello,
I have been stuck on this for some time and invested many hours trying to find a solution. I am trying to either loop through two variables or or two arrays and not sure how to do it. I am limited to ksh only, and don't have the ability to do a foreach, or for i AND for j etc...I... (19 Replies)
Discussion started by: Decoy Octopus88
19 Replies
4. Shell Programming and Scripting
bash in RHEL 6.4
I have a requirement in which I want to get the iteration count from a WHILE LOOP.
The below mentioned simple script test.sh works fine. In the below script, the WHILE loop will iterate every 5 seconds infinitely until it greps the string BASKETBALL from /tmp/somestring.txt... (6 Replies)
Discussion started by: John K
6 Replies
5. Shell Programming and Scripting
I have a script with logic like:
my_function()
{
if
mkdir $1
mkdir mydir_${2}
else
do something else
fi
}
read in list of items
while read list
do
my_function $list `date`
done
so basically it will make a directory for every name in the list and create a directory with the... (6 Replies)
Discussion started by: glev2005
6 Replies
6. Shell Programming and Scripting
for VGLIST in `lsvg -o`
do
CLOSED_OUT=`echo $VGLIST | lsvg -l $VGLIST | awk '{print $6 " " $7}' | grep closed`
if ]; then
echo "Filesystems $CLOSED_OUT in VG that are in Closed status"
else
echo "\n Some message"
fi
Above Code is working fine, but echo "Filesystems $CLOSED_OUT... (8 Replies)
Discussion started by: chandu123
8 Replies
7. Shell Programming and Scripting
question :how can i iterate to next item in for loop with the loop
e.g
for i in `cat abc.txt`
do
echo $i // this will display first line
i=$i+1; // this doesnt work for me.
echo $i; //this will display secound line
done
question: is my approach to manipulate text good?
I have... (3 Replies)
Discussion started by: kashif_islam
3 Replies
8. UNIX for Dummies Questions & Answers
So, Just for practice, I wrote a simple fibonacci sequence script in bash.
(03:08:02\$ cat fib
#!/usr/bin/bash
ret ()
{
echo -ne "\n"
sleep .5
}
a=1
b=2
echo -n $a #1 A
ret
echo -n $b #2 B
ret (8 Replies)
Discussion started by: DeCoTwc
8 Replies
9. Shell Programming and Scripting
Should work in any shell, but requires GNU date, although GNU date seems only to be happy for input dates between 1902 and 2037, inclusive (49673 days).
Assume $a and $b hold two dates, e.g.
set a=2010-03-27
set b=2010-04-04
Marginally faster:
iterator: seq -f "$a +%1.0f days" 1 50000 |... (0 Replies)
Discussion started by: laddiebuck
0 Replies
10. Shell Programming and Scripting
Another question, is it possible to, in a for-loop incrementing until it reaches a certain number, to have it loop again without incrementing? Just have it drop what it is doing when it reaches this command and start again at the same number it was at? I know I could make a while loop and just... (0 Replies)
Discussion started by: jeriryan87
0 Replies