Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to get value from set of values in csh Post 302681769 by RudiC on Saturday 4th of August 2012 10:32:25 AM
Old 08-04-2012
One option - which I don't know if it works in csh - would be to assign the whole stuff to an array and then access array [position]:
Code:
ar=($(echo $files))
echo ${ar[17]}

You have to verify this in csh.
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

csh and the set command

Hi, I am trying to write a csh script that will run another csh script, but redirect the output from the second script to an email. my code looks like this. #!/bin/csh ## This script is designed to run the SSM.sh ## then email the output to a specified email address ## it will also display... (2 Replies)
Discussion started by: jagannatha
2 Replies

2. Shell Programming and Scripting

alternate to set -x in csh scripts

hi all i want to debug a csh script and i give set -x for that but i get an error. is there any command similar to set -x for csh scripts? (3 Replies)
Discussion started by: sais
3 Replies

3. Shell Programming and Scripting

In a csh script, can I set a variable to the result of an SQLPLUS select query?

Can someone tell me why I'm getting error when I try to run this? #!/bin/csh -f source ~/.cshrc # set SQLPLUS = ${ORACLE_HOME}/bin/sqlplus # set count=`$SQLPLUS -s ${DB_LOGIN} << END select count(1) from put_groups where group_name='PC' and description='EOD_EVENT' and serial_number=1;... (7 Replies)
Discussion started by: gregrobinsonhd
7 Replies

4. Shell Programming and Scripting

Equivalent of set -o vi in csh

Hi, I am working with two shells on two different users. one is on ksh and one is on csh. In ksh I use set -o vi and I am able to see my history commands by typing esc,- keys. I want the same feature in csh as well how can I do that. Regards, Venkat (3 Replies)
Discussion started by: svenkatareddy
3 Replies

5. Shell Programming and Scripting

tcsh/csh: set prompt in production to color red

Hi folks This is our prompt at the moment oracle@pinkipinki:/opt/oracle> grep 'set prompt' .cshrc set prompt = "$user@`uname -n`:$cwd> " We wish to have in production the same prompt, but red. Howto do that? I tried a lot a internet manuals, but it doesn't work. (1 Reply)
Discussion started by: slashdotweenie
1 Replies

6. Shell Programming and Scripting

Storing values in arrays using csh

I am reading a number of files but then I want to put the ranges xmin xmax ymin ymax as arrays for each file. Any idea how I can do this??? set j = 1 echo "Welcome $i times" while ( $j <= $i ) echo "$j" set fname = $fin-bst-misf.xy echo " "$fname ... (0 Replies)
Discussion started by: kristinu
0 Replies

7. Shell Programming and Scripting

csh shell script 'set' argument limit?

Hi , I have a script that is causing a problem that led me to think if there is a limit to the number of arguments for 'set' command in csh shell script. Here is my script: #!/bin/csh -f set top = design_top #1 set v_mbist = ( sim_mbist/*.v ) #2 set v_simlist = ( -v... (2 Replies)
Discussion started by: return_user
2 Replies

8. Shell Programming and Scripting

csh and variable values with spaces

my working shell is csh and even though if I try to run my script in plain sh, it behaves the same way. Here's a simple script: #!/bin/sh desc='"test my changes"' cmd="echo \"$desc\"" $cmd I want $desc to be passed as an argument to another command, but csh apparently doesn't like spaces in... (5 Replies)
Discussion started by: iskatel
5 Replies

9. Shell Programming and Scripting

Csh , how to set var value into new var, in short string concatenation

i try to find way to make string concatenation in csh ( sorry this is what i have ) so i found out i can't do : set string_buff = "" foreach line("`cat $source_dir/$f`") $string_buff = string_buff $line end how can i do string concatenation? (1 Reply)
Discussion started by: umen
1 Replies

10. Shell Programming and Scripting

How to set variable permanent in csh?

We are using csh on our AIX platform, if we have to export/set a specific environment variable we use setenv command but its only valid till session. How do we set that variable permanent in our csh AIX? Do we put it in userprofile file or something else? (1 Reply)
Discussion started by: aixusrsys
1 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 05:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy