10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file /u/setuplink.txt
more setuplink.txt
ln -s /u/force.sh stopf.sh
ln -s /u/tnohup.sh tnohup.sh
ln -s /u/quick.sh startquick.sh
more runstat.sh
#!/bin/bash -e
echo "START"
/u/setuplink.txt
echo "END"
i wish to exit the runstat.sh for any errors except if the link... (2 Replies)
Discussion started by: mohtashims
2 Replies
2. Shell Programming and Scripting
The below bash does not seem to exit if the user response is n N no No. Is the synatax incorrect? Thank you :).
Bash
read -r -p "Is this correct? " response
if ]
then
echo "The files do not match" && exit ;;
else
.... do something
fi (5 Replies)
Discussion started by: cmccabe
5 Replies
3. Programming
Hello,
I'm trying to read the variable "pause" from a for loop without luck. The function is dependant on the outcome of the test within the loop. If i run this, pause is always 0 within the function. Any ideas?
Thanks.
pause=0
users=1
(for (( ; ; ))
do
speed=`cat speed.log`
... (7 Replies)
Discussion started by: shadyuk
7 Replies
4. Ubuntu
I'm writing a bunch of scripts to automatically configure Ubuntu and I want to run the code below to remove the white dots from the login screen:
sudo xhost +SI:localuser:lightdm
sudo su lightdm -s /bin/bash
gsettings set com.canonical.unity-greeter draw-grid false
The problem is that... (3 Replies)
Discussion started by: maerlyngb
3 Replies
5. Shell Programming and Scripting
I am newbie to perl,
I am trying to use the below syntax to replace globally a string with a variable.
$ bash -version
GNU bash, version 2.05b.0(1)-release (powerpc-ibm-aix5.1)
Copyright (C) 2002 Free Software Foundation, Inc.
$ perl -version
This is perl, v5.8.8 built for... (2 Replies)
Discussion started by: jville
2 Replies
6. Shell Programming and Scripting
Hi there,
following code snippet should output nothing, IMHO. But the result is "THE END".
#!/bin/bash
if true ; thenexit
fi | grep "somesearchstring"
echo "THE END"using bash 4.1.9(1)
Bug or feature?
Hagen (5 Replies)
Discussion started by: montour
5 Replies
7. Shell Programming and Scripting
Solved Stupidly I didn't put brackets around the , thanks for all the help guys
if ps ax | grep Cluster__check.bash | grep -v grep > /dev/null -- fails
(if ps ax | grep Cluster__check.bash | grep -v grep > /dev/null) --works (3 Replies)
Discussion started by: danmc
3 Replies
8. Shell Programming and Scripting
Hello
Okay, for reasons related to sourcing a script from another script, I've had to put my main loop into a function, and from there I call other functions. My problem then is exiting from deep within the function call stack.
I used to simply call exit, and that would accomplish what I... (1 Reply)
Discussion started by: brsett
1 Replies
9. UNIX for Advanced & Expert Users
I am using functions in a script and for some strange reason the EXPORT command doesnt seem to be making my variables global.
Anyone got any ideas?
I am using one function to pass some output top another using the pipe command, eg
Function 1 | Function 2
Function 2 reads the value... (3 Replies)
Discussion started by: gregf
3 Replies
10. Shell Programming and Scripting
I apologize if I have already posted this query. I scanned back quite a few pages but could not find such a query.
If my perl code contains "exit(33)" how can I get that value in bash for use in a "if" statement.
Thanks,
Siegfried (5 Replies)
Discussion started by: siegfried
5 Replies