On Tue, 2009-12-22 at 09:28 +1300, Bryce Stenberg wrote:

> To help my scripting, is there a simple way (one liner maybe) to ask for
> the user to input a multi-character value and assign it to a variable?
echo ( -n leaves the cursor on the same line )

displays text on the screen

echo -n "Name: "
> 
> Also, is there an equivalent of the DOS 'pause' command under bash?
read name

reads a line from standard input into the variable defined.

Can be used to pause until data is entered, and also to save responses.

echo "Hello, $name"


Steve

-- 
Steve Holdoway <[email protected]>
http://www.greengecko.co.nz
MSN: [email protected]
GPG Fingerprint = B337 828D 03E1 4F11 CB90  853C C8AB AF04 EF68 52E0

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to