06-20-2005
Quote:
Originally Posted by cbkihong
which on my system will now give the correct order instead of 'B', 'A'. I may be wrong in this regard given my limited knowledge in I/O in general and the way it is implemented in Perl. So if you have less clumsy ways to achieve this or would like to make corrections, do it.
Thanks cbkihong. I shall try the options that you have provided. I probably will not understand your explanation until I have actually tried the various forms that you have suggessted. Thanks Jerardfay.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'.
I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies
2. Shell Programming and Scripting
General Question: If a script calls multiple external programs (external to the script, but still on unix), where do the return codes go? Let's say one of external programs fails, does the entire script fail and send a non-zero return code to the job scheduling software, or is the return code sent... (1 Reply)
Discussion started by: jnanasakti
1 Replies
3. Shell Programming and Scripting
i have to run set of commands
command1
command2
command3
command4
Now Whenever any of these command fails i should quit while capturing error message.
Is there a better way then checking for $? after each command. (1 Reply)
Discussion started by: vickylife
1 Replies
4. Shell Programming and Scripting
Hi,
I have a unix shell script which is launching multiple java processes by calling a java class in a loop, but each time with a different set of parameters.
Now I have to use the return code from each process in the script later.
but how do i obtain the return code from each process... (1 Reply)
Discussion started by: rama354
1 Replies
5. Shell Programming and Scripting
Hi,
I have a script which does something like the below:
execute_some_script.sh $arg1 $arg2 `exec-some-cmd`
if then;
do something
else
do something else
fi
However, during some cases, there is an error saying:
line xxx: [: too many arguments
at the line number which has... (5 Replies)
Discussion started by: laloo
5 Replies
6. Shell Programming and Scripting
Hi,
I need to retrun multiple values
function errorFileCreation
{
echo "Before"
return -1 "Siva";
echo "Aftyer"
}
echo ${?} - This can be used to getting first value.
how can i get second one.
Advance Thanks...
Shiv (3 Replies)
Discussion started by: rsivasan
3 Replies
7. Shell Programming and Scripting
HI,
Please help me on this. I have to execute 100 scripts which i have redirected in to a file . I want to pause the script after first execution and once i say enter key word it has to go to next execution. My looks like
for RUNFILES in `cat ${SOURCEFILES}/scripts`
do
echo $RUNFILES;
... (1 Reply)
Discussion started by: srichunduru
1 Replies
8. Shell Programming and Scripting
I wrote this script
#!/bin/bash
var=`du -sch /var/log/messages;du -sch /var/log/maillog`
echo $var
I am getting result as follows.
# sh my.sh
2.1M /var/log/messages 2.1M total 296K /var/log/maillog 296K total
I need it like below
2.1M /var/log/messages
296K... (3 Replies)
Discussion started by: anilcliff
3 Replies
9. UNIX for Advanced & Expert Users
(2 Replies)
Discussion started by: Venkatesh1
2 Replies
10. Shell Programming and Scripting
when it runs and look at my acron.log file it generates an error as below
/tmp/prog.sh: line 4: (12 Replies)
Discussion started by: azherkn3
12 Replies