Search Results

Search: Posts Made By: Anteus
4,022
Posted By Anteus
snippet 1psg ServTest | grep -v "grep" | grep -v...
snippet 1psg ServTest | grep -v "grep" | grep -v "vi" | awk '1 {printf "debug -", $0 } {
pgm_name=$8
cmd_name="ServTest"
gsub(/[[:space:]]*/,"",pgm_name)
...
4,022
Posted By Anteus
Why is code snippet 1 and 3 giving different...
Why is code snippet 1 and 3 giving different output.?
Can anyone tell me this.

Thanks and Regards.
4,022
Posted By Anteus
syntax error at line 2 : `'' unmatched
syntax error at line 2 : `'' unmatched
4,022
Posted By Anteus
When ServTest running Output awk ...
When ServTest running
Output

awk
ServTest not running! = ServTest
s0lawre 3408 3404 1 00:06:33 pts/t8 0:00 awk {
ServTest not running! = ServTest
pgm_name=$8
ServTest not...
4,022
Posted By Anteus
yeah that is correct but Why is the code snippet...
yeah that is correct but Why is the code snippet 1 giving different output..

the output of snippet 1 and 3 shoud be same rite?
4,022
Posted By Anteus
awk script giving unstable results
Hi all

Here I came accross a situation which i am unable to reason out...

snippet 1

psg ServTest | grep -v "grep" | grep -v "vi" | awk '{
pgm_name=$8
cmd_name="ServTest"
...
10,711
Posted By Anteus
one more way.. psg -t...
one more way..


psg -t "?"| awk '{
cname=($5 ~ /^[A-Z]/)? $9:$8
len=length(cname)
regex="/"
for(i=1;i<=len;i++)
...
10,711
Posted By Anteus
psg -t "?"| awk '{ command=($5 ~...
psg -t "?"| awk '{
command=($5 ~ /^[A-Z]/)? $9:$8
exe="basename " command " >> cmd_Name"
system(exe)
if (cmd_Name == "tec")
{...
10,711
Posted By Anteus
I want to use the command variable like this than...
I want to use the command variable like this than what i have to do??


psg -t "?"| awk '{
command=($5 ~ /^[A-Z]/)? $9:$8
exe="basename " command " >> command"
...
10,711
Posted By Anteus
psg -t "?"| awk '{ command=($5 ~...
psg -t "?"| awk '{
command=($5 ~ /^[A-Z]/)? $9:$8
exe="basename " command " >> command"
system(exe)
printf(" second name %s \n",command)
...
10,711
Posted By Anteus
getting basename inside awk script
hi if we have to use basename how can we do this in awk?
did the below but is not working..

psg -t "?"| awk '{
command=($5 ~ /^[A-Z]/)? $9:$8
...
1,736
Posted By Anteus
hi thanks 2nd way the code works..and give...
hi thanks
2nd way the code works..and give output as desired.
1st method compiles but doesnt give desired output.(couldnt figure out why?)

---------- Post updated at 03:58 PM ----------...
1,736
Posted By Anteus
tried this too mode=$1 if [[ $# -ne...
tried this too

mode=$1


if [[ $# -ne 1]] || [[ ${mode} -ne "find" && ${mode} -ne "kill" ]] then
echo "MODES:"
fi


In both cases the error is common


Tes[2]: syntax error at...
1,736
Posted By Anteus
syntax error in the if construct
Hi
can anyone tell me why is this code giving error


mode=$1
if [[ $# != 1]] || [[$mode != "find" && $mode != "kill" ]] then
echo "MODES:"
exit 1
fi



Thanks
25,938
Posted By Anteus
hi thanks what does this regex mean..? $0 ~...
hi thanks
what does this regex mean..?
$0 ~ /^[#].*/

$0 is the associative array of the awk. so wont it be containing the ouput of the psg command.?
25,938
Posted By Anteus
i have done what i was trying to do.. ...
i have done what i was trying to do..


list=`cat /u/Test/programs`;
for line in $list
do
psg "ServTest" | awk -v pgm_name=$line '{
cmd_name=($5 ~ /^[A-Z]/)? $9:$8
...
25,938
Posted By Anteus
reading a file inside awk and processing line by line
Hi Sorry to multipost. I am opening the new thread because the earlier threads head was misleading to my current doubt.
and i am stuck.




list=`cat /u/Test/programs`;
psg "ServTest" |...
1,646
Posted By Anteus
I never knew to type dablu dablu dablu dot...
I never knew to type

dablu dablu dablu dot google dot kom..

thanks for showing me a start a decade back :b:

regards
1,646
Posted By Anteus
okk yeah $0 is argv[0] ---------- Post...
okk
yeah $0 is argv[0]

---------- Post updated at 04:04 PM ---------- Previous update was at 04:00 PM ----------

please delete this thread if you can there are lot of silly mistakes in this...
1,646
Posted By Anteus
ooh i am sorry about echo . my mistake. after...
ooh i am sorry about echo . my mistake. after correcting it printf is printing so it means code inside awk is executing..

why the printf inside for loop is not printing list has two lines.
why...
1,646
Posted By Anteus
control is not going inside the awk ?
Hi


the control is not going inside the awk..
/u/bin/psg -t "pts/tC" |/bin/grep -e "ServTest" | /bin/grep -v "root"
run separately in the command line lists the running process..

why is...
7,912
Posted By Anteus
hi panyam thanks a lot. Its working fine...
hi panyam

thanks a lot. Its working fine now.

Regards
7,912
Posted By Anteus
Hi. I am not allowed to use a file as such...
Hi.

I am not allowed to use a file as such only a log file is maintained. in which process killing time has to be entered .. cant we do within awk.?

and in order to kill process within awk...
7,912
Posted By Anteus
process of finding the process is done. now...
process of finding the process is done. now required to kill and put process details in the u/bin/Test...
7,912
Posted By Anteus
yes i did, this code works print " " $0 >>...
yes i did, this code works print " " $0 >> /u/bin/Test

psg telnetd | awk -v hn=`hostname` current=`date +%M`'{
pid=$2
uid=$1
split($5,a,":")
...
Showing results 1 to 25 of 54

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