Search Results

Search: Posts Made By: biglau
1,513
Posted By biglau
PERL: testing directory on windows platform
Hi Gurus, kindly analyse the following for me, please
OS: Windows 7
Code location: C:\
Output: "Program Files not being recognised"
"System Volume Information is a directory"
...
1,876
Posted By biglau
and the following test in bash: can anyone...
and the following test in bash:
can anyone could explain the differences of the behaviors?

linux-hhaq:/apps/informatica/current/pmserver/tes/scripts # if [[ `echo` ]]; then echo yes; else echo...
1,876
Posted By biglau
That's right, but why [[ ]] does not support `` ?...
That's right, but why [[ ]] does not support `` ?

---------- Post updated at 09:31 AM ---------- Previous update was at 09:16 AM ----------

bro, what if I need to put multiple conditions in an...
1,876
Posted By biglau
Query on decision making...
is_number()
{
echo $1|egrep '^[1-9][0-9]*$' 2>&1 1>/dev/null
return $?
}why the following snippet always give an output as "no" and never "yes" whatever the parameter I give...
2,398
Posted By biglau
Got, $PPID, This is brilliant
Got, $PPID,
This is brilliant
2,398
Posted By biglau
Invoker of script
Gurus

2 scripts

script_a.ksh:

#!/bin/ksh
./script_b.ksh

script_b.ksh
#!/bin/ksh
echo "Invoker\'s name is: "

How could script_b get its invoker script name?
Any variable...
1,860
Posted By biglau
You are right, seems I have to write a customized...
You are right, seems I have to write a customized function to get the returning status, like

function rt_status()
{
eval "$1"
return $?
}

then I can use the function like the following...
1,860
Posted By biglau
yup, but is there a way to get a general...
yup, but is there a way to get a general commond/function execution status(returning number) withcout using $?

and btw, what if I use the dual square brackets, it only check if the returning value...
1,860
Posted By biglau
returning status of a command
Hello gurus,

Tired of using $? to view the execution status of the previous command.

how can I get the status directly?

definitely this is not working,

if [[ `grep pattern file_name`...
6,970
Posted By biglau
ls -ltr |grep -v "^d" |awk '{a+=$5} END{print...
ls -ltr |grep -v "^d" |awk '{a+=$5} END{print "files size total " a/1000 "KB"}'
5,744
Posted By biglau
Cool, thank you very much.
Cool, thank you very much.
5,744
Posted By biglau
How to put the STDOUT back to terminal
I have put the file descriptor 1 to file, using command exec 1>>out.txt
Then I could not see any output on the screen, how could I restore the default output to terminal? :mad: Thanks
3,192
Posted By biglau
dhanamurthy, thank you for your reply, but could...
dhanamurthy, thank you for your reply, but could you please specify how the array name "arr" was defined outside of awk snippet (in shell)?

and the $0 means every line from the file? so your...
3,192
Posted By biglau
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 08:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy