How to solve this problem "Illegal Option"


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to solve this problem "Illegal Option"
# 1  
Old 06-30-2012
Bug How to solve this problem "Illegal Option"

I am just trying to read the password from command prompt that user should type with in 10 seconds,

I am getting "read: Illegal option -t"

Code:
#!/bin/bash                                                                                                                                                                                  
   read -t 10 -p "Enter your password: " password
   echo $password


Last edited by Scrutinizer; 06-30-2012 at 06:09 AM.. Reason: code tags
# 2  
Old 06-30-2012
https://www.unix.com/shell-programmin...d-command.html

Moderator's Comments:
Mod Comment Please do not post (only) links (even to forum content) without adding value, additional info, etc. - Thanks!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to solve M5000 CPU "Deconfigured" state?

Hi Community, i have one M5000 spare machine which was handled by support team. they told me that it is gone completely . i have checked the status. before it was showing MBU_B degraded. i updated to latest firmware and , resetted the xscf and now this is showing as normal. MBU_B... (5 Replies)
Discussion started by: bentech4u
5 Replies

2. UNIX for Dummies Questions & Answers

Is "stat: illegal option -- -" an issue with hyphenated filename or flag problem?

Hi. I'm trying to install VMWare Workstation to run a virtual machine on my Mac OS, but running the bundle from bash(xterm) sh VMware-workstation-Full-11.0.0-2305329.x86_64.bundle (as suggested in install guide) comes up with error:stat: illegal option -- - usage: stat Digging... (5 Replies)
Discussion started by: defeated
5 Replies

3. UNIX for Dummies Questions & Answers

What is the meaning of "-s" option in "if" statement?

Hi Guys, I'm sorry but I can't find answer for this, what is the meaning of -s option in "if" statement on unix scipting. Please see sample below: opath=/home/output for i in N1 N2 N3 N4 do echo $i if then grep $i $opath/N5_CRAI > $opath/N5_$i.crai chmod 777 $opath/N5_$i.crai ... (7 Replies)
Discussion started by: rymnd_12345
7 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. UNIX for Dummies Questions & Answers

Error: "logger: illegal option -- p"

Hi All, I am working on a Solaris 10 server. From this month start, it gives the error "logger: illegal option -- p" with each command. If I execute a script whose output shown on terminal, it comes many times.. Could you please help? It comes only for my login. And I dont remember any changes... (4 Replies)
Discussion started by: jaiseaugustine
4 Replies

6. Shell Programming and Scripting

read -p "prompt text" foo say "read: bad option(s)" in Bourne-Shell

Hallo, i need a Prompting read in my script: read -p "Enter your command: " command But i always get this Error: -p: is not an identifier When I run these in c-shell i get this error /usr/bin/read: read: bad option(s) How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies

7. UNIX for Advanced & Expert Users

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have a problem about the Oracle related components. I'm not able to find any answer yet, and waiting for your responses... Here is the configuration of my system: * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or... (1 Reply)
Discussion started by: talipk
1 Replies

8. UNIX and Linux Applications

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or question of my own) is: Oracle tns listener, "CT_LISTENER", and the enterprise manager (EM) of the instance, which is uniq instance and called... (0 Replies)
Discussion started by: talipk
0 Replies

9. Solaris

How to solve "ioscan -En" hardware errors

Hi, I found devices errors in #ioscan -En. it is showing that soft errors = 0 and hard errors= 5. what should i do for hard errors=0. Thanks. (4 Replies)
Discussion started by: arjunreddy3
4 Replies

10. Programming

What is an "Illegal Instruction -Core Dumped"

Hai! i am working on Digital UNIX V3.2c Work station, my program uses Pro*C, C and X-Motif calls. i am facing problem while running application saying "Illegal Instruction Core Dumped". debugger dbx shows error at a line which shows "noname". when commenting large portion of the code it runs... (1 Reply)
Discussion started by: samn
1 Replies
Login or Register to Ask a Question