How is shell reading this?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How is shell reading this?
# 1  
Old 03-04-2010
How is shell reading this?

Morning (or evening) all.
I have some code:
Code:
tput cup 21 1 ; echo "Press ENTER to continue. . . "
read prompt

Nowhere do I see "prompt" define.
How is shell reading prompt? I'm so used to writing code in SAS, COBOL, etc where everything has to be defined.
Thank you
# 2  
Old 03-04-2010
prompt is initialized with the read command giving prompt the value entered at the keyboard, here its effect is to make the user interract ( since it display "Press enter to continue")...

Last edited by vbe; 03-04-2010 at 12:12 PM.. Reason: typo (my dyslexia is getting worse...)
# 3  
Old 03-04-2010
Lightbulb How is shell reading this?

ahhhhhhhhhhhhhhhhhhhhh...
Thank you.Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading arguments for a shell script from file

I have a shell script that takes 2 arguments. I will have to execute this script multiple times with different values for the arguments. for example, ./shscript env1 value1 ./shscript env1 value2 ./shscript env2 value3 ./shscript env3 value4 ./shscript env1 value5 ./shscript env3... (24 Replies)
Discussion started by: goddevil
24 Replies

2. Shell Programming and Scripting

Reading a table from shell

i want to do something like this from shell, for any user without having to enter any passwords i want to store the value in the option_value column into a variable select option_value from `$databasename`.`wp_options` where option_name="template"; what is the command i should use? ... (0 Replies)
Discussion started by: vanessafan99
0 Replies

3. Shell Programming and Scripting

Shell Scripting Reading List

Hello Everyone, Over the last few months I have begun to expand my programing skills from windows, Java and SQL / PL-SQL programing into the wonderful world of shell scripting. With little training budget my only options for training are books, Internet and this site (BTY... (1 Reply)
Discussion started by: caddis
1 Replies

4. Shell Programming and Scripting

Reading from Keyboard - Shell Script

How do i read from kb using shell script but i need to read it from same line. Script :- echo "Please Enter Your Choice " read CHOICE But it goes to next line i need it to read it next to Choice and not new line. (4 Replies)
Discussion started by: dinjo_jo
4 Replies

5. Shell Programming and Scripting

reading from stdin in a shell script

Hello, I've managed to get my .procmailrc file to work. At least it triggers a script which creates a file. But the file is empty. How do I get at the data that's been piped? I've done much creative googling to no avail. I belive it should be in stdin, but I can't figure out how to access... (4 Replies)
Discussion started by: mmesford
4 Replies

6. Shell Programming and Scripting

Reading numbers thru shell

Dear pal, I want to read only numbers thru a shell script, If user is trying to enter character it should block that ... Pls help to me find out a solution (2 Replies)
Discussion started by: bhagyaraj.p
2 Replies

7. UNIX for Dummies Questions & Answers

Reading a file in C shell

I recently started working in c shell and I am embarrassed to say I can't get a single read using while command to work while read line do print $line done < list.txt Can somebody help. I need a solution specific to C shell. The error I get is "while: Expression Syntax." (3 Replies)
Discussion started by: paruthiveeran
3 Replies

8. Shell Programming and Scripting

file reading through shell script

For reading a file through shell script I am using yhe code : while read line do echo $line done<data.txt It reads all the line of that file data.txt. Content of data.txt looks like: code=y sql=y total no of sql files=4 a.sql b.sql c.sql d.sql cpp=n c=y total no of c files=1 (4 Replies)
Discussion started by: Dip
4 Replies

9. Shell Programming and Scripting

Reading data from a file through shell script

There is one Text file data.txt. Data within this file looks like: a.sql b.sql c.sql d.sql ..... ..... want to write a shell script which will access these values within a loop, access one value at a time and store into a variable. can anyone plz help me. (2 Replies)
Discussion started by: Dip
2 Replies

10. Shell Programming and Scripting

Reading a table in a shell script

Dear all: I want to write a script capable of reading specific rows and collumns of a table, into a variable. Just imagine i have a file named table.dat which contains: GENERAL INFORMATION Col 1 Col2 Col3 1 1 2 2 3 3 4 4 What i want to do... (13 Replies)
Discussion started by: luiscarvalheiro
13 Replies
Login or Register to Ask a Question