10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am trying to make a 4x4 matrix and I would greatly appreciate any help.
I have 4 text files and I want to do the following. I want to concatenate them and gzip them. Then I want to find the file size of the concatenated file and subtract the value of file A. Finally, I want to output this final... (1 Reply)
Discussion started by: sdw8253
1 Replies
2. Shell Programming and Scripting
Hi,
I'm reading a csh setup script, and came across these lines:
################################
if (! $?PROJECT_ROOT) then
setenv PROJECT_ROOT /proj/proj_123
endif
################################
Does the if endif command means, "if there is no variable named "PROJECT_ROOT",... (3 Replies)
Discussion started by: mar85
3 Replies
3. UNIX for Dummies Questions & Answers
I found my answer... (2 Replies)
Discussion started by: sjung9442
2 Replies
4. Shell Programming and Scripting
Hi Everyone,
I have a ksh script that queries a database. The query output looks like this:
$queryResult =
echo ${queryResult} = name1
echo ${queryResult} = age1
echo ${queryResult} = name2
echo ${queryResult} = age2
...
I need to insert those values into a new array that would... (2 Replies)
Discussion started by: practitioner
2 Replies
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
Hi guys,
I'm a scripting noob in need of some help :)
I am creating a script that checks the filesystems and will alert based upon if the percent full is greater than the threshold set.
The problem that I am having is that when I set the 'filesystem' variable, all of the output is treated as... (12 Replies)
Discussion started by: tank126
12 Replies
7. Shell Programming and Scripting
Hi all,
I want to use some commands and I wrap them into an array, like follows:
set ALIAS_AR = ( "ls -ltr|wc -l" \
"ps -ef|grep -v grep |grep tty|wc -l" \
"who|wc -l" )
Then I use a while loop to call every step:
set no = 1... (3 Replies)
Discussion started by: tpltp
3 Replies
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
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
10. UNIX for Dummies Questions & Answers
Ksh Scripting
Can some one give me a simple example of array operations using ksh.
For Ex:
week_array = {Sunday Monday Tuesday Wednesday Thursday Friday Saturday}
I want to assign and retrieve and print them along with their index.
I am looking for the o/p like:
0 Sunday
1 Monday ... (2 Replies)
Discussion started by: ravikirankethe
2 Replies