Succesfully completion of a command in unix script


 
Thread Tools Search this Thread
Operating Systems HP-UX Succesfully completion of a command in unix script
# 1  
Old 03-02-2010
Succesfully completion of a command in unix script

Hi,

I want to wrote a script. say it has 4 command(e.g. a,b,c,d). I want my script to progress b if a completes succesfully. So can you please let me know what command/parameter i need to set.

Thanks,
Malay
# 2  
Old 03-03-2010
add a if condition

Code:
A....

if [ $? eq 0 ]
then
B....
else 
exit
fi

# 3  
Old 03-03-2010
Code:
a && b

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with delaying script and implementing checks before completion

Hello everyone, I was wondering if any of you could help me with this. I am an absolute beginner and don't know how to program, but I can follow a tutorial and tweak code sometimes. My understanding of programing is limitted to what for and while loops do, and how if then else logic works. That... (2 Replies)
Discussion started by: tomeurp
2 Replies

2. Shell Programming and Scripting

Ssh bash script exits without remote command completion

Hi, My goal is to connect from unix server A to windows server B and call a bat file on windows. I am able to succeed in remoting to windows and executing a command, the issue i am facing is the shell scrip is exiting without making sure of bat file success. Can you please help me in... (4 Replies)
Discussion started by: pxp018
4 Replies

3. UNIX for Dummies Questions & Answers

Bash-completion on shell script

Hello I want use bash_completion on a script but the information on the internet give me not a solution. The scrip start with "cd" to a direction Than the script do "ls" Than I must give a name of a sub-direction and here I want to use <TAB>, so when I have a direction with the name smith... (2 Replies)
Discussion started by: thailand
2 Replies

4. Shell Programming and Scripting

Expect Script Aborts Before Completion

Hi guys, i have a script that logs into a range of hosts and runs an update involving apt-get: apt-get update problem i'm having is, before i do the apt-get, i do a apt-get update. and this process is completed quickly for most servers. but some servers, it can take a while. my expect... (1 Reply)
Discussion started by: SkySmart
1 Replies

5. Ubuntu

Does anyone succesfully ported windos7 sticky note to linux

Hi, I wonder if someone successfully ported windows 7 sticky notes to linux sticky notes a like.. If any what package used.. Thanks in advance. (2 Replies)
Discussion started by: jao_madn
2 Replies

6. Shell Programming and Scripting

Challenging task : script for mailing process completion timing report to users.

Hi all, This is my first post. I am new to unix scripting. My requirement is as follows : We are using a financial backoffice application. Now at the end of day we have send users a status report stating all timings of EOD processes for all countries. I need timings for following... (0 Replies)
Discussion started by: ammbhhar
0 Replies

7. Shell Programming and Scripting

hp unix doesn't have tab completion

hi guys, i am new to HP unix , i am doing Solaris , i am just asking is there any thing like "bash" in hp unix including tab completion? (8 Replies)
Discussion started by: dagigg
8 Replies

8. UNIX for Dummies Questions & Answers

Script to check process completion

Hi, OS - Unix Iam doing the following: after login to the unix box 1. change directory 2. run a shell script "preinstall.sh" 3. This takes apprx 5 mins 4. after which i use to change permission of a file "installhub.sh" (this file is generated from the previous step). Is there anyway... (2 Replies)
Discussion started by: kenkanya
2 Replies

9. UNIX for Dummies Questions & Answers

command completion in .sh or .ksh in AIX environment

How do you user command completion in .sh or .ksh in AIX environment? I know you can do it by hitting <esc><esc> in bash, but how do you do it in bourne or korn shell in AIX 5.3 environment? Thanks in advance. (1 Reply)
Discussion started by: pdtak
1 Replies

10. UNIX for Dummies Questions & Answers

tab completion using ! history command

Hi all, I recently discovered the ! command. I think it's great that !cd ? will match the last command that began with cd ?. However, for ! to be particularly useful to me (for now anyway) it would be nice if there was a tab completion option available (as with the cd command). Does anyone know... (3 Replies)
Discussion started by: x-375HK-x
3 Replies
Login or Register to Ask a Question