10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
i am new here let me say HI for all.
now i have a question please:
i am sending one command to my machine to create 3 names.
if one of the names exists then the box return error message that already have the name but will continue to create the rests.
How i can break the command and... (7 Replies)
Discussion started by: Amiri
7 Replies
2. Shell Programming and Scripting
Hi,
I am writing shell script to automate few use cases for CLI interface. We have CLI interface which has bunch of commands. I am trying to execute one of the commands 'exit' as part of automation to exit from CLI object (not from shell script) in my shell script.
My intension is to execute... (4 Replies)
Discussion started by: Mahesh Desai
4 Replies
3. Shell Programming and Scripting
Hi,
suppose my script is sample.sh
i have to run using '. ./sample.sh'
as . ./script file always executes the script in my parent shell.
when my sample.sh contains exit command .. my environment is getting closed as am executing in the parent shell ...
please suggest me how can i use... (5 Replies)
Discussion started by: pracheth
5 Replies
4. Shell Programming and Scripting
Hi Guys,
How can I exit from the shell script if a condition is not met?
Thanks in advance... (2 Replies)
Discussion started by: Phuti
2 Replies
5. Shell Programming and Scripting
Hi,
Can anyone help me how to exit a shell script if a unix command inside does not return any value for 10 seconds?
The scenarios is like this.
I want to login to a application using shell script where the connection string is mentioned.but suppose this connection string is not... (10 Replies)
Discussion started by: arijitsaha
10 Replies
6. Shell Programming and Scripting
Hello All
My req is to store the exit status of a command in shell variable
I want to check whether the file has header or not
The header will contain the string
DATA_ACQ_CYC_CNTL_ID
So I am running the command
head -1 $i | grep DATA_ACQ_CYC_CNTL_ID
Now I have to check if... (6 Replies)
Discussion started by: Pratik4891
6 Replies
7. Shell Programming and Scripting
hi guys
I have a script that I need to terminate or exit the shell or session completely for the user but the exit only exit from the script and takes the user to the shell
I found this
https://www.unix.com/unix-dummies-questions-answers/399-using-exit-command-shell-script.html
saying that... (1 Reply)
Discussion started by: kopper
1 Replies
8. Shell Programming and Scripting
I need help in the following script. I want to grep the sql errors insert into the error table and exit the shell script if there is any error, otherwise keep running the scripts.
Here is my script
#!/bin/csh -f
source .orapass
set user = $USER
set pass = $PASS
cd /opt/data/scripts
echo... (2 Replies)
Discussion started by: allinshell99
2 Replies
9. Shell Programming and Scripting
Hi All,
I have developed below script for FTP a file from unix machine to another machine.
ftpToABC ()
{
USER='xyz'
PASSWD='abc'
echo "open xx.yy.zbx.aaa
user $USER $PASSWD
binary
echo "put $1 abc.txt" >> /home/tmp/ftp.$$
echo "quit" >> /home/tmp/ftp.$$
ftp -ivn <... (3 Replies)
Discussion started by: RSC1985
3 Replies
10. Shell Programming and Scripting
could somebody tell me please how to exit a shell script:
if
then
echo "No arguments detected"
exit 1
fi
...
echo "still there" # is displayed .. :-( (4 Replies)
Discussion started by: sami98
4 Replies