10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
I am in SunOS usvh3eudv80 5.10. facing problem in my script:
#!/bin/bash
var1=`date +"%m%d%H%M"%S.zip`
echo " Hi your current dir is :---> $(pwd)";echo " Changing to home dir:"
cd ~ 2>/dev/null || {echo "Change dir failed ....Quiting...." && exit 2 }; ls -lrt
echo... (3 Replies)
Discussion started by: krsnadasa
3 Replies
2. UNIX for Dummies Questions & Answers
We have a requirement where in the user needs to select a option 4 from the menu and the putty window should be closed.I tried giving exit 0 ;; and this is only exiting from the script menu and showing back the prompt.Is there a way for this. (2 Replies)
Discussion started by: gopalt
2 Replies
3. Shell Programming and Scripting
The problem is
I need it too go from the main menu by pressing 6, to the submenu search_proc. In the search_proc menu/section it need to accept a variable and search the processes for it and sort by PID and Process name. I'm stuck and ran out of ideas. I also cannot figure out why it keeps... (2 Replies)
Discussion started by: skizo787
2 Replies
4. Shell Programming and Scripting
Hi, I have this menu:
main_menu()
{
while true
do
print " ************************************"
clear
print " 1) Configuracion de RBAC (ADMIN)."
print " 2) Configuracion de roles a usuarios (SISTEMAS)."
print " 3) Salir."
... (6 Replies)
Discussion started by: iga3725
6 Replies
5. Shell Programming and Scripting
Hi All,
i have a script named as 1. scr_FTP.sh, it calls the script(2)
2. file_create.sh
And in that 2nd script, i use the below function run_complete_workflow().
I introduced exit(1) to exit from the function: run_complete_workflow() and also from the 2nd script: file_create.sh and... (3 Replies)
Discussion started by: vsmeruga
3 Replies
6. UNIX for Dummies Questions & Answers
Problem with exit command
-----------------------------------------------------------------------
Hi,
I am executing script written by other user.
I am executing script A.ksh, and A.ksh calls B.ksh.
But It is giving error:
/home/user/B.ksh: exit: -1: unknown option
When I checked... (3 Replies)
Discussion started by: shreyas
3 Replies
7. Shell Programming and Scripting
Hi All
Its strange or i am doing it wrong.When find run successful it return exit status 0.And same if it didn't run successfully it return zero.
find /var/www/html -maxdepth 1 -type f -name *.dsadas
echo $?
0
find /var/www/html -maxdepth 1 -type f -name *.php... (1 Reply)
Discussion started by: aliahsan81
1 Replies
8. Shell Programming and Scripting
Hi,
I am kinda confused with this, am not sure what is happening
i have a script say test.sh
----------
cat myfile | while read line
do
exit 2
done
echo "out of loop"
-----------
as it is evident, the exit should cause the script to terminate ,hence producing no output for the... (1 Reply)
Discussion started by: sumirmehta
1 Replies
9. Shell Programming and Scripting
i am writing a script to perform some mysqldumps and gzip them. The problem I am running into is that if the user specifies a database that doesn't exist, the error the mysql engine produces is still piped into gzip, and the exit code returned is 0. If I don't pipe into gzip, an exit code... (4 Replies)
Discussion started by: bitoffish
4 Replies
10. Shell Programming and Scripting
Hi,
Consider the output of the following commands:
case1)
-------
# ifconfig -a | grep "UP" | grep uplink0:1
# echo $?
Output is: 0
case2
------
# ifconfig -a | grep "UP" | grep uplink0:1; echo $?
Output is: 1
In case2 we got the exit code as 1, which is the actual exit code.... (1 Reply)
Discussion started by: diganta
1 Replies