10 More Discussions You Might Find Interesting
1. Linux
Hi All,
I came across a weird scenario which i couldnt explain why.
As part of script which is run as /bin/sh shebang, we are trying to check if there is any process that runs with the same name ignoring the current process and kill it.
But for some reason, there are 2 process returned as part... (1 Reply)
Discussion started by: varathaneie
1 Replies
2. Shell Programming and Scripting
Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only..
it... (6 Replies)
Discussion started by: Madhu Siddula
6 Replies
3. Shell Programming and Scripting
Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only..
it... (1 Reply)
Discussion started by: Madhu Siddula
1 Replies
4. Shell Programming and Scripting
I apologize for the title but I am not even sure myself what to call this. I am going to use an example of a pizza delivery. I need to make an interactive script that allows users to order a certain number of pizzas, and then choose what they want on each pizza. Here is my code so far....
... (1 Reply)
Discussion started by: cstadnyk1
1 Replies
5. Shell Programming and Scripting
Hello,
I wonder if it my problem can be solved. Inside File1.txt, there are 3 columns. Inside File 2.txt, contain certain variable(in this case, only "3"). So I want to : (copy File 1 x Variable in File 2). Expected result are File 3.txt.
Any help are really appreciated.
File 1.txt
-92.033... (4 Replies)
Discussion started by: guns
4 Replies
6. Shell Programming and Scripting
hey mates,
I was wondering if someone could assist me with this one, I have couple scripts that I would like to invoke from .sh ( One after another )
Script1
Script2
Script3
Is it possible to run script 2 after script one finished running ? And again start script 3 after script 2... (6 Replies)
Discussion started by: NDxiak
6 Replies
7. Shell Programming and Scripting
#!/bin/sh
count=0
for i in 2 4 6
do
echo "i is $i"
count='expr $count + 1'
done
echo "The loop was executed $count times"
with these scripts
my output is :
i is 2
i is 4
i is 6
The loop was executed expr $count + 1 times
What should I do to get the value instead of 'expr... (17 Replies)
Discussion started by: ymwong
17 Replies
8. Shell Programming and Scripting
Hi,
I wrote a awk line here:
awk 'BEGIN {OFS="\t"} {print $0, int(rand()*($2-$1 + 1) + $1) }' filename
Basically what it does is that it takes the start (column 1) and stop (column 2) and generates a random # in between start and stop.
I want to take this a step further and have it... (2 Replies)
Discussion started by: phil_heath
2 Replies
9. UNIX for Dummies Questions & Answers
how to execute more than one command at the same time in unix .. (4 Replies)
Discussion started by: hemaa
4 Replies
10. Shell Programming and Scripting
Hi,
I am stuck with pattern matching.
I need to match a particular pattern several times in a same line and replace them.
for ex.,
I need to convert
(abc XY) (bvf ZY) bla bla
to
XY ZY bla bla
I tried..
s/\(+ (.+)\)/$1/gi
and it works (2 Replies)
Discussion started by: oldtrash
2 Replies