Sponsored Content
Top Forums Shell Programming and Scripting Accepting user input in c shell Post 302135402 by kamitsin on Sunday 9th of September 2007 03:01:09 AM
Old 09-09-2007
read will not work in csh.

use the following command to read from stdin in csh,

Code:
set req = $<

All the best with CSH Smilie
kamitsin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Accepting User Input

I'm just starting out with UNIX and have figured some stuff out. I just need some help with accepting user input on the command line. For instance, I created a number counter that counts down from any positive hard coded number. But, I want the commnad line line to read "Countdown 20" where 20... (1 Reply)
Discussion started by: scott78
1 Replies

2. Linux

Why isn't the computer accepting input?

I'm using Red Hat Linux 3, and the computer has stopped taking input from mouse, keyboard, etc. What are possible causes? How can I fix? -Worried Linux User (11 Replies)
Discussion started by: lunchtime
11 Replies

3. Shell Programming and Scripting

Accepting user input in Bourne shell and using sed

He guys. Basically I want to make a script that can add, delete and view stuff in a external file called config.txt. I can open it up in Joe but im not sure how to read in the user input or using commands automatically in joe to edit, save then quit. Problem area below: 1) echo "Add... (1 Reply)
Discussion started by: Pits
1 Replies

4. Shell Programming and Scripting

invloking another script accepting input

hi I am trying to invoke another application script from my script like --------------------------- main . . ./new appl <<EOF Input 1 Input 2 EOF . . exit ------------------------ But is exits the new application after input command 2, I want that it should not exit and accept... (1 Reply)
Discussion started by: ashish_uiit
1 Replies

5. UNIX for Dummies Questions & Answers

accepting input date

I how do i accept a input date in script which is lesser than a specified day? ex: to accept a date less than or equal to 100 days(from today).?:( Thanks for the help in advance.:) (1 Reply)
Discussion started by: abhi_123
1 Replies

6. Shell Programming and Scripting

Displaying default values when accepting input from user

Is there a way to display the default answer when accepting input from the user in the unix script.. e.g. ans="n" read $ans?"Enter y to continue n to exit:" altough ans contains n the message doesn't display the current contents on ans .. you get Enter y to continue n to exit: (8 Replies)
Discussion started by: flopster
8 Replies

7. Shell Programming and Scripting

accepting input then send to file

basically im trying to promt the user to create a name for a file then send the file name to a file with the list of the file names he has created. Also i want to code if the user doesnt enter any text to just print "Default Folder" so far my code looks like: if then echo "create `$1`... (1 Reply)
Discussion started by: bravens52
1 Replies

8. Shell Programming and Scripting

Accepting user input and arguments in PERL

Hi All, Can we pass arguments while calling the perl script and as well as ask user input during execution of the script? My program is as below: I am passing arg1 and arg2 as argements to test.pl ]./test.pl arg1 arg2 Inside the test.pl I have : print "Do you want a name ? (y/n) : ";... (2 Replies)
Discussion started by: jisha
2 Replies

9. Shell Programming and Scripting

Accepting Input regardless of Case

Hi I am trying to get my script to accept input regardless if the person enters a or A. here is the portion of the code where I get the input. echo -n 'Please enter your choice:' # prompt user for input. read reply # read input echo case $reply in #... (2 Replies)
Discussion started by: DualPandas
2 Replies

10. Solaris

Solaris LDOM not accepting keyboard input at console

Ran into this issue today and wanted to share how I fixed it as there is not a lot a lot of info online on this issue. We upgraded our NetApp controllers to Ontap 9 and reboot all our iSCSI attached LDOMs after. One of the LDOM did not come up cleanly and it would not accept any keyboard inputs... (0 Replies)
Discussion started by: ncherukuri
0 Replies
xpaset(1)							SAORD Documentation							 xpaset(1)

NAME
xpaset - send data to one or more XPA servers SYNOPSIS
<data> | xpaset [-h] [-i nsinet] [-m method] [-n] [-p] [-s] [-t sval,lval] [-u users] [-v] <template|host:port> [paramlist] OPTIONS
-h print help message -i access XPA point on different machine (override XPA_NSINET) -m override XPA_METHOD environment variable -n don't wait for the status message after server completes -p don't read (or send) buf data from stdin -s enter server mode -t [s,l] set short and long timeouts (override XPA_[SHORT,LONG]_TIMEOUT) -u [users] XPA points can be from specified users (override XPA_NSUSERS) -v verify message to stdout --version display version and exit DESCRIPTION
Data read from stdin will be sent to access points matching the template or host:port. A set of qualifying parameters can be appended. Normally, xpaset reads data input from stdin until EOF and sends those data to the XPA target, along with parameters entered on the command line. For example to send a FITS file to the ds9 image display: cat foo.fits | xpaset ds9 fits Sometimes, however, it is desirable to send only parameters to an XPA access point, without sending data. For such cases, use the -p switch to indicate that there is no data being send to stdin. For example, to change the colormap used by the ds9 image display program, use: csh> xpaset -p ds9 cmap Heat Of course, this also can be accomplished by sending EOF to stdin in any of the usual ways: csh> echo "" | xpaset ds9 cmap Heat csh> xpaget ds9 cmap Heat < /dev/null csh> xpaset ds9 cmap Heat ^D # Ctl-D signals EOF The -s switch puts xpaset into server mode, in which commands and data can be sent to access points without having to run xpaset multiple times. (Its not clear if this buys you much!) The syntax for sending commands in server mode is: csh> xpaset -s xpaset ds9 colormap I8 ^D xpaset ds9 regions circle 200 300 40 circle 300 400 50 ^D etc. After the required "xpaset" command is specified, optional ASCII data can be appended (as in the region example). A single data/command set is delimited by ^D. Note that typing ^D when a command is expected terminates the program. NB: server mode only works from the terminal and only ASCII data can be sent in this way. Examples - csh> xpaset ds9 file < foo.fits csh> echo "stop" | xpaset myhost:12345 SEE ALSO
See xpa(7) for a list of XPA help pages version 2.1.14 June 7, 2012 xpaset(1)
All times are GMT -4. The time now is 04:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy