Sponsored Content
Top Forums UNIX for Advanced & Expert Users why the script is not terminating with proper results Post 302574920 by vgersh99 on Friday 18th of November 2011 04:47:13 PM
Old 11-18-2011
or with ksh:
Code:
#!/bin/ksh

read fname?'your first name please '

read lname?'your last name Please '

if [ "$lname" != toys -o "$fname" != Gun ]
then
        echo 'Wrong name.  Goodbye!'
        exit 1
fi

echo "User $lname, $fname accepted"

This User Gave Thanks to vgersh99 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

terminating script with CTRL+D

Hi, I'm trying to make a script that reads the console input and terminates with CTRL+D. It's absolutely basic but I don't know how to "read" the CTRL+D. I've tried a bunch of things like EOT=^D while //with & without quotations do read input echo $input done while while ] ... (12 Replies)
Discussion started by: sanchopansa
12 Replies

2. UNIX for Dummies Questions & Answers

Terminating child script with terminating the parent script

Hi I was working on a shell script with randomly shows a page of text from a randomly selected topic .As soon as the page is displayed it callers a timer script which keeps on running indefinitely until the timer script is killed by the user. This is where I have the problem,if I press... (2 Replies)
Discussion started by: mervin2006
2 Replies

3. AIX

The shell script is not returning proper result

Can anybody pls look into this script and tell me where I went wrong. After running this script, it is showing like "Trying to overlay current working directory ABORT!!!" :-( ARGCNT=$# if then echo "Two parameters are needed for this shell " echo "Please try again with... (1 Reply)
Discussion started by: clnsharma123
1 Replies

4. Shell Programming and Scripting

script unexpectedly terminating

I now that this isnt the greatest code around. Im a network guy by trade not a programer .. but needed something to compare config files ... Anyway ... intermittently, the program terminates. Ive been looking at the code for a week trying to figure it out and Im stumped. Can anyone provide... (0 Replies)
Discussion started by: popeye
0 Replies

5. Shell Programming and Scripting

getting proper o/p from a procedure in a script

foll. is my code snippet. #!/bin/ksh retVal=`sqlplus -s user/passwd@oracle_sid <<EOF SET SERVEROUTPUT ON SIZE 100000 DECLARE STATUS_VALUE CHAR; BEGIN SELECT temp1 INTO STATUS_VALUE FROM sai; DBMS_OUTPUT.PUT_LINE(STATUS_VALUE); END; / SET... (1 Reply)
Discussion started by: sainathdeg
1 Replies

6. Shell Programming and Scripting

how to terminate ssh connection without terminating script

Hi all, I connect with SSH connection to remote machine in the script and ı want to logout at half of the script then continue to script. If ı write exit in the script it terminates script not SSH connection. How can i do that please help me (1 Reply)
Discussion started by: fozay
1 Replies

7. Shell Programming and Scripting

How can i terminating expect script without terminating SSH connection.

Hi all , i know i ask a lot of question but these are really hard to solve and important question. I send two scripts: expect.sh: #!/usr/local/bin/expect spawn ssh root@172.30.64.163 expect "login:" send "root\n" expect "password:" send "root\n^M" interact and son.sh: ... (2 Replies)
Discussion started by: fozay
2 Replies

8. Shell Programming and Scripting

issue invoking shell script using cron, even with proper file permission

I am using tcsh what could possibly be a problem, when using crontab to invoke a shell script. ? The script has the read, write and execute permission to all users. And the script works as expected while executing it in stand-alone mode. Is there a way to trace (like log) what error... (9 Replies)
Discussion started by: vikram3.r
9 Replies

9. Shell Programming and Scripting

Getting Proper Date Format in SH Script

There's a small SH script I'm trying to write where it will get the current month and find a log file that is based on the date. Example: Today is February, so the log file is going to be 201102.log (2011 + 02) An additional thing is that if today is the 1st of a month, it will also find the log... (3 Replies)
Discussion started by: kooshi
3 Replies

10. UNIX for Dummies Questions & Answers

tcsh: how to prevent a foreach from terminating a script when the result is null?

Sorry if this has been answered. I did search both Google and this site and did find this post: unix.com/unix-dummies-questions-answers/152992-how-ignore-errors-script.html However, it wasn't answered. I have the same question - how do you prevent a tcsh script from terminating when the... (4 Replies)
Discussion started by: deepstructure
4 Replies
lname(3erl)						     Erlang Module Definition						       lname(3erl)

NAME
lname - Interface that supports the name pseudo-objects. DESCRIPTION
This interface is a part of the names library which is used to hide the representation of names. In Orbers Erlang mapping the pseudo-object names and the real IDL names have the same representation but it is desirable that the clients uses the names library so they will not be dependent of the representation. The lname interface supports handling of names e.g. adding and removing name components. Note that the lname interface in orber does not contain a destroy function because the Names are represented as standard Erlang lists and therefor will be removed by the garbage collector when not in use. The type NameComponent used below is defined as: -record('CosNaming_NameComponent', {id, kind=""}). id and kind are strings. The record is defined in the file CosNaming.hrl and it is included with: -include_lib("orber/COSS/CosNaming/CosNaming.hrl"). EXPORTS
create() -> Return Types Return = [NameComponent] This function returns a new name. insert_component(Name, N, NameComponent) -> Return Types Name = [NameComponent] N = int() Return = Name This function returns a name where the new name component has been inserted as component N in Name. get_component(Name, N) -> Return Types Name = [NameComponent] N = int() Return = NameComponent This function returns the N:th name component in Name. delete_component(Name, N) -> Return Types Name = [NameComponent] N = int() Return = Name This function deletes the N:th name component from Name and returns the new name. num_component(Name) -> Return Types Name = [NameComponent] Return = int() This function returns a the number of name components in Name. equal(Name1, Name2) -> Return Types Name1 = Name2 = [NameComponent] Return = bool() This function returns true if the two names are equal and false otherwise. less_than(Name1, Name2) -> Return Types Name1 = Name2 = [NameComponent] Return = bool() This function returns true if Name1 are lesser than Name2 and false otherwise. to_idl_form(Name) -> Return Types Name = [NameComponent] Return = Name This function just checks if Name is a correct IDL name before returning it because the name representation is the same for pseudo and IDL names in orber. from_idl_form(Name) -> Return Types Name = [NameComponent] Return = Name This function just returns the Name because the name representation is the same for pseudo and IDL names in orber. Ericsson AB orber 3.6.20 lname(3erl)
All times are GMT -4. The time now is 09:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy