Sponsored Content
Full Discussion: Array problems in CSH
Top Forums Shell Programming and Scripting Array problems in CSH Post 302290696 by frijofranco on Tuesday 24th of February 2009 02:50:47 AM
Old 02-24-2009
The simplest way you can do this is like this

for ex:
CMD="ls -l | wc -l"

echo $CMD | /bin/sh
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

command substitution problems with csh using grep

I am trying to set a command into a variable in a csh script using command substituion with ``. I am having a problem with ps command combined with grep. The command is as follows (shows processes running with the word gpts in them). /usr/ucb/ps axwww | grep gpts this works fine at the... (2 Replies)
Discussion started by: voodoo31
2 Replies

2. Shell Programming and Scripting

associate array problems in awk

hi, i have 3 fields in a file and linked them through 2 associative arrays.. the problem is one of the associative array is working while the other is not.. the code part is: awk ' BEGIN { FS="|" rc = getline < "ICX_RULES" while ( rc == 1 ) { rule_id=$1 rule_parameter=$2... (2 Replies)
Discussion started by: aami_sayan
2 Replies

3. Shell Programming and Scripting

How to define array in Bourne shell , csh & ksh

Dear friends... Kindly if any one can help me to know the differences in definning & retreiving data from arrays in the sh,csh & ksh. I always facing problems in this issue. thanks...:) BR (3 Replies)
Discussion started by: ahmad.diab
3 Replies

4. Shell Programming and Scripting

AWK in CSH script problems

Hello Guys, I was trying to obtain the information from the /etc/passwd file, here was my script: 38 echo -n "What's your login name? " 39 set logname=$< 40 echo "Your login name is $logname, your user's ID is `grep $logname /etc/passwd|awk -F: '{print $3}'`" 41 echo " Your home dir is... (1 Reply)
Discussion started by: tpltp
1 Replies

5. Shell Programming and Scripting

csh array help!!

I'm trying call the first item in the array then put it in a loop to call the next items in order. set $p = (port-1, port-2, port-3, port-4, exit) <sourcePort>daughtercard:$P</sourcePort> if ($p == "exit") then break else ($p >> 1) I know the above code isn't correct. I'm... (1 Reply)
Discussion started by: drkelly76
1 Replies

6. Shell Programming and Scripting

Perl - Problems iwith colors while printing from dynamic array at runtime..

Hi Perl folks, I am having problems printing elements from an array at runtime. I wish to push elements into array at runtime and the print it later. Now I wish to print this matrix using colors. So I do something like this to enter the runtime values in array: ... (1 Reply)
Discussion started by: som.nitk
1 Replies

7. Shell Programming and Scripting

csh array missing some elements

I'm having a problem with this bit of my script. '/tmp/data' contains the output of 'ls -l', and I'm assigning a couple of the columns to an array. The problem is that it line starts on the third line of 'ls -l' rather than the first one. @ count = 7 set line = `cat /tmp/data` while ($count... (1 Reply)
Discussion started by: tkirk
1 Replies

8. Shell Programming and Scripting

4x4 Array in csh scripting

I am trying to code a 4 by 4 array. However the naming convention is diffrent. Please refer the image below https://lh5.googleusercontent.com/-Dl0vdjfXtU0/Tnh02_ORJpI/AAAAAAAAAKU/4c2zyFP9IB0/array.JPG I want to name them in order : from 0 to 3 --> (0,0) cell to (0,3) from 4 to 7 --> (1,0)... (0 Replies)
Discussion started by: animesharma
0 Replies

9. Shell Programming and Scripting

problems with ksh array and find command

set -A allfiles `find $usrhtml -type f` i am trying to populate this array with the find command. It works fine when find is looking through a single directory but when i add a new subdirectory the files in the subdirectory get duplicated. Can anyone help me and fix this so each files in... (1 Reply)
Discussion started by: bjhum33
1 Replies

10. UNIX for Dummies Questions & Answers

Problems passing strings within an array

i have a list of apps that i need to forcequit and, from time to time, that list changes. perfect excuse to manage a single array! however, my strings with spaces aren't passing as i'd like them to. here's the simple script: #!/bin/sh #-----Array apps=( firefox-bin firefox... (6 Replies)
Discussion started by: hungryd
6 Replies
TH-CMD(1)							Triggerhappy daemon							 TH-CMD(1)

NAME
th-cmd -- triggerhappy commander SYNOPSIS
th-cmd --socket <socket> [--passfd] [--tag <foo>] [--clear|--enable|--disable|--mode <mode>|--quit|--udev|--add <devices...>|--remove <devices...>] DESCRIPTION
This program is used to issue commands to a running triggerhappy daemon. It utilizes an unix domain socket bound by the daemon. OPTIONS
--socket socket The socket file opened by the running triggerhappy daemon instance. --add <devices...> Instruct the running daemon to open the input devices specified on the command line --remove <devices...> Remove specified devices from the running daemon. --clear Remove all devices from the running daemon. --udev Deduce operation and device name from udev environment (for use in udev rules). --disable Disable the execution of triggers. --enable Re-enable the execution of triggers. --mode <newmode> Change the mode of the triggerhappy daemon to <newmode>. If no new mode is specified, the daemon switches to default mode. --quit Terminate the triggerhappy daemon. --passfd Instead of instructing the daemon to open the device, open the device and pass the file descriptor to the daemon. This allows the adding of new devices to a daemon having dropped its privileges, however the th-cmd process must have access to the device file. --grab Grab the device; the triggerhappy daemon will try to get exclusive access to the device, other applications will not receive the events emitted by it. --tag foo Label the added device with the tag <foo>; this can be used to limit the scope of event handlers to a subset of input devices. AUTHOR
Stefan Tomanek <stefan.tomanek+th@wertarbyte.de> 0.3.4 2011-05-10 TH-CMD(1)
All times are GMT -4. The time now is 02:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy