10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
There are two Korn Shell scripts :
script_1.ksh ( located in /home/dir1 )
script_2.ksh ( located in /home/dir2 )
Content of script_2.ksh is
#!/usr/bin/ksh
echo "Hello world.."
The script_2.ksh is called from within script_1.ksh using the following command :
./home/dir2/script_2.ksh
but... (7 Replies)
Discussion started by: kumarjt
7 Replies
2. Shell Programming and Scripting
Hi i have to cut columns 2 to 6 from a file and assign it to arrays ,
The following code works
for ctcol in 2 3 4 5 6;
do
set -A a$ctcol $(cut -d, -f $ctcol test_file)
done
how ever this does not work
for ctcol in {2..6};
do
set -A a$ctcol $(cut -d, -f $ctcol test_file)... (4 Replies)
Discussion started by: 100bees
4 Replies
3. Shell Programming and Scripting
Hello All,
I'm writing a Bash Script and in it I execute a piped command within a Function I wrote and I can't seem to redirect the
stderr from the 1st pipe to stdout..?
I'm setting the output to an Array "COMMAND_OUTPUT" and splitting on newlines using this --> "( $(...) )". By putting... (6 Replies)
Discussion started by: mrm5102
6 Replies
4. UNIX for Dummies Questions & Answers
If I execute the following line of code:
echo "*"
I get a list of files in the current directory.
What if all I wanted to do was display the asterisk itself? What does the code have to look like so all I get is an asterisk?
Thanks ahead of time for your assistance
----------... (3 Replies)
Discussion started by: Wreckoning
3 Replies
5. UNIX for Dummies Questions & Answers
i want to save the output of /scripts/whoowns domain.com to a username
like $user = /scripts/whoowns domain.com
but I'm not sure how to do that
This is inside a bash script
how can I get the output of /scripts/whoowns
then save that to a variable?
thanks!
---------- Post updated at... (0 Replies)
Discussion started by: vanessafan99
0 Replies
6. Shell Programming and Scripting
I'm tring to write down a simple script that would execute a command and wait until it returns a specific result.
This is what i did:
bjobs_out=`bjobs`
while ]; do
bjobs_out=`bjobs`
sleep 6
done
It seems to work until the command 'jobs' return the list of jobs in execution, but... (4 Replies)
Discussion started by: lifedj
4 Replies
7. Shell Programming and Scripting
Hi guys
I am calling one DB2 stored proc through unix. It is giving me below output. I want to capture the value 150 in one UNIX variable in shell script. Please let me know how I can achieve this. Thanks in advance
Value of output parameters
--------------------------
Parameter Name :... (5 Replies)
Discussion started by: vnimavat
5 Replies
8. Shell Programming and Scripting
Hi all, I'd like to capture the output from the 'top' command to monitor my CPU and Mem utilisation.Currently my command isecho date
`top -b -n1 | grep -e Cpu -e Mem` I get the output in 3 separate lines.Tue Feb 24 15:00:03
Cpu(s): 3.4% us, 8.5% sy .. ..
Mem: 1011480k total, 226928k used, ....... (4 Replies)
Discussion started by: new2ss
4 Replies
9. Shell Programming and Scripting
Explain this?
$ ls | grep -e "crd\|cs"
crd
cs
$ CLONES=`ls | grep -e "crd\|cs"`;echo $CLONES;
crd cs
$ CLONES=`ls | grep -e "crd\|cs"`;echo "$CLONES";
crd
cs (1 Reply)
Discussion started by: blasto333
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have an expression using grep and nawk that captures the ID number of a given Unix process. It gets printed to screen but I don't know how to declare a variable to this returned value!
For example,
ps -ef|grep $project | grep -v grep | nawk '{print $2}'
This returns my number. How... (2 Replies)
Discussion started by: babariba
2 Replies