Download Shells: User's Guide
Transcript
read read Syntax 24 For POSIX Shell only (note that name must be specied): 2 3 read -r name ... For Korn Shell only: 2 2 3 32 32 3 name?prompt name . . . This shell input mechanism reads a line from standard input and places each word into the parameter name using the separator specied by the IFS shell parameter. If name s are not specied, the line is read into the Korn Shell REPLY variable (see select). If the ?prompt is included the user is prompted interactively with prompt . The denitions of the options are: -p Read from the output of the process spawned with |&. -r Do not interpret the \ at the end of a line as line continuation. -s Put the input line into the history le. -un Read the input from le descriptor n . read -prsu n Example $ echo 'What is your name? \c' $ read name $ echo "Hello, $name . . . " The rst line prints a prompt and leaves the cursor one blank to the right of the ?. The next line reads in text from the user and saves it in $name. Last, a line is printed which includes the value of $name (since the string is in double, not single, quotes). read field1 field2 junk This reads the rst whitespace-separated word from an input line into $field1, the second into $field2, and the rest into $junk, which is presumably ignored. Part III: POSIX and Korn Shell FINAL TRIM SIZE : 7.5 in x 9.0 in Command Reference 24-27
Related documents
Shells: User's Guide
Sears 831.288264 User`s manual
Manual Supplement for HP Instrument BASIC Users Handbook
HP 720 Workstation Installation guide
EDMI Genius Register Manual
GPIB Programming Guide - Steven M. Anlage Research Page
HP 9000 742i Technical data
CAD-0215 Series User Manual v1.1_APT
USER`S MANUAL
English
HP GlancePlus User`s Manual
Notice - Agilent Technologies