LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-30-2013, 01:40 PM   #1
gedinfo
LQ Newbie
 
Registered: May 2013
Posts: 4

Rep: Reputation: Disabled
bash shell read question


I have come across a bash shell, which consists of a read command, which, when executed, results in the data NOT appearing that was entered.

This is how the command appears in the .sh file:

read -s -p "Enter directory(i.e. 1 -> Core, 2 -> Offset:" DirectoryValue

I have searched for what the -s and -p flags mean, but have not been successful.

Where is a good reference to the flags that read utilizes?

Thank you.
 
Old 12-30-2013, 02:22 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
The bash man page.

Search for the SHELL BUILTIN COMMANDS section and the read command will be one of them.

Its rather long, but this is mentioned about -s and -p
Quote:
-s Silent mode. If input is coming from a terminal, characters are not echoed.
Quote:
-p prompt Display prompt on standard error, without a trailing newline, before attempting to read any input. The prompt is displayed only if input is coming from a terminal.
 
1 members found this post helpful.
  


Reply

Tags
read



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash Shell read out RSS Feed newest Title Tealk144 Programming 4 02-02-2012 01:02 PM
Bash shell scripting - read choose next mravljica Programming 12 04-22-2009 02:11 PM
Read command in bash shell file doesn't work jh111451 Linux - Software 4 07-28-2008 08:35 PM
Bash Shell: Using the value of $A to read the value of $B ? TIGA Programming 7 04-25-2008 02:00 AM
BASH Shell program Read a configuration File minil Programming 10 01-17-2005 04:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration