How to let the user to choose two options at the same time in terminal?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to let the user to choose two options at the same time in terminal?
# 1  
Old 04-07-2012
How to let the user to choose two options at the same time in terminal?

I am lost in my script and I need someone to help me with it.
how can I have two or more options chosen by user at the same time. eg.
Quote:
$ myscript -up username datafile
right now this is the output:
Quote:
$ myscript -up username datafile

USAGE: /bin/myscript [options] file

Last edited by bashily; 04-07-2012 at 03:17 PM.. Reason: NEVER MIND! I FOUND MY MISTAKES. IT WAS SYNTAX ERROR!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

UNIX equivalent of windows terminal server options?

I want to replace Windows terminal server mostly due to cost reasons license cost for 2100 users goes out of roof. The end-user is all windows but I want a jump server that is UNIX based , I have some experience with VNC but I don't want options exists in UNIX to run a terminal services for 2100... (10 Replies)
Discussion started by: lazerz
10 Replies

2. Shell Programming and Scripting

How to get user to choose files to be copied to FTP server?

Hey all. I'm writing a script to automatically login to a router, change directories to where crashfiles are located, then listing all files in that directory. This is where I'm at so far and wish to have some user interaction to choose the files. What I am trying to do is list the files and get... (1 Reply)
Discussion started by: Gouda
1 Replies

3. Shell Programming and Scripting

How to automate user selection options in shell script?

Hi There, I am trying to write a script which has to pick the prompted options by itself(i mean option to choose will be passed) here is real scenario i am trying to do. i have an executable(diagnos) which gets called in shell script, when the executable (diagnos) runs i get following as... (8 Replies)
Discussion started by: sairam_9191
8 Replies

4. AIX

Time Zone for a User Different From Server Time

Hi, A server runs on EDT. Can I set a user with time-zone GMT without changing the server time? regards, Roshni (1 Reply)
Discussion started by: RoshniMehta
1 Replies

5. Solaris

User specific printing options

Hi, how do I query available printer options and set defaults for my print requests? I have found lpoptions (man lpoptions(1)) on the web but it doesn't seem to be available under Solaris and I can't work out how else to do it. Thanks, Bob (2 Replies)
Discussion started by: BobD
2 Replies

6. Shell Programming and Scripting

date and time to display on the terminal

hi all, am trying to 'grep' some text from a log file and use the 'cut' command to read from that line i just grep'ed to extract date/time and response times. code sniplet i am using is : grep -i 'text to grep' Out.log | while read LINE; do ... (11 Replies)
Discussion started by: cesarNZ
11 Replies

7. UNIX for Dummies Questions & Answers

Run the start script from the terminal? Newbie Time!

Hi, How do I "run a script"? I'm trying to start up some software called ElectroServer 3, and was told I just needed to "run the start script from the terminal to get things going". From the terminal, i use cd command to change to the software's directory, and I guess the script in question is... (4 Replies)
Discussion started by: waking_bear
4 Replies

8. Post Here to Contact Site Administrators and Moderators

User CP Options

I have added a signature and uploaded an Avatar but I do see them in my posts. What could I be doing wrong? What file extension should the avator file be? I have tried to upload as both .gif and as .avatar (have not seen this extension type before but it was listed on a site or two as a valid... (3 Replies)
Discussion started by: google
3 Replies

9. Shell Programming and Scripting

Terminal Hungup at the time of read

Hi, There are two scripts. The second script is called from the first one. These will create two processes on unix. In the second script, there is a read statement in the while loop. Under unexpected conditions, at the time of reading response from the user, if the terminal hungup happens,... (1 Reply)
Discussion started by: pkusumam
1 Replies

10. UNIX for Dummies Questions & Answers

Output to terminal and file at the same time

Hi all The makefile of a large project produces hundreds of lines of output, which I can't look at any more when the build is finished. If I simply redirect the output to a file, I can't see the progress of the building process... Is there a possibility to redirect the output to a file and at... (1 Reply)
Discussion started by: Charlie
1 Replies
Login or Register to Ask a Question
SHCOMP(1)						    User Environment Utilities							 SHCOMP(1)

NAME
shcomp - compile a ksh93 shell script SYNOPSIS
shcomp [ options ] [infile] [outfile]] ORIGIN OF THIS MAN PAGE
This man page was written by Christophe Martin <Schplurtz@free.fr> for the Debian GNU/Linux system. It is based on "shcomp --man" output. DESCRIPTION
Unless -D is specified, shcomp takes a shell script, infile, and creates a binary format file, outfile, that ksh93 can read and execute with the same effect as the original script. Since aliases are processed as the script is read, alias definitions whose value requires variable expansion will not work correctly. If -D is specified, all double quoted strings that are preceded by $ are output. These are the messages that need to be translated to locale specific versions for internationalization. If outfile is omitted, then the results will be written to standard output. If infile is also omitted, the shell script will be read from standard input. OPTIONS
-D, --dictionary Generate a list of strings that need to be placed in a message catalog for internationalization. -n, --noexec Displays warning messages for obsolete or non-conforming constructs. -v, --verbose Displays input from infile onto standard error as it reads it. --man Displays this man page on standard error and exits. --help Shows a short help message and exits. EXIT STATUS
0 Successful completion. >0 An error occurred. DEBIAN WARNING
On a Debian GNU/Linux system, more than one package may provide ksh. the output of shcomp can only be used by ksh93. Any other ksh will be unable to run the compiled script. EXAMPLE
( echo '#! /bin/ksh93' ; shcomp myscript ) > myscript.bin && chmod 755 myscript.bin ./myscript.bin SEE ALSO
ksh(1) IMPLEMENTATION
version shcomp (AT&T Labs Research) 2012-02-29 author David Korn <dgk@research.att.com> copyright Copyright (c) 1982-2012 AT&T Intellectual Property license http://www.eclipse.org/org/documents/epl-v10.html KSH93 Fri Jun 3 2005 SHCOMP(1)