Search Results

Search: Posts Made By: praveenbvarrier
1,395
Posted By praveenbvarrier
Sorry , awk is not working as expected .... ...
Sorry , awk is not working as expected ....
#cat test_sudo
User_Alias TEST=test1,test2,test3,test4,test5,\
test6,test7,ltest8,test9


#awk '{sub(/\\/,...
1,395
Posted By praveenbvarrier
Remove EOL selectively
Hi,

I have a text as below

test1 test2 test3\
test4 test5 test6 test7
newtest1 newtest2\
newtest3 newtest4 newtest5

And need this to be replaces to

test1 test2 test3 test4 test5...
12,705
Posted By praveenbvarrier
Hyy , I need all the remaining argument , not...
Hyy , I need all the remaining argument , not only the third , for eg:- if the total arguments are 7 the output shuld be the last 5 arguments .. and if the total argumetns are 10 thn the o/p shuld...
12,705
Posted By praveenbvarrier
Remove the first two words from shell arguments
Hi
I need to delete first two words from the arguments my script receives .. no matter how many arguments are passed .

Thanks
Praveen
93,621
Posted By praveenbvarrier
I got a problem here I removed the public...
I got a problem here

I removed the public key config on the ssh server and then tried

ssh root@$host "echo 2>&1" && echo "OK" || echo "NOK"

But it came out asking password . which I dont...
34,112
Posted By praveenbvarrier
waah , thats gr8 , and yeah , this also...
waah , thats gr8 ,

and yeah , this also didthe job , i replaced the uniq with sort -u

new_var=$(echo "$var1"|tr " " "\n"|sort -u|tr "\n" " ")


Thank You
34,112
Posted By praveenbvarrier
unique sort contents of a variable
Hi ,

I have

#echo $var1
#hdisk2 hdisk3 hdisk0 hdisk2

Now I need to remove duplicate entries from this . ie. after sorting it should only have

hdisk2 hdisk3 hdisk0 .

I can have...
93,621
Posted By praveenbvarrier
Great thanks , This is helpfull.
Great thanks , This is helpfull.
93,621
Posted By praveenbvarrier
check ssh connection to remote host
I am using KSH and I need to check whether the remote host has been configured with ssh public key. Is there any way we can check inside a script?
2,900
Posted By praveenbvarrier
NOw that the above problem is solved , I am stuck...
NOw that the above problem is solved , I am stuck up with another grep issue,

I replaced the cat like below:-
cat $FileName | grep -v "#" | sed -e 's/ / /g' | awk '{print '$awk_filter'}' |...
2,900
Posted By praveenbvarrier
ksh scripting help
I have the file as below

server1 no dr aix 5300-05-03 9119-595 20-18888 yes ftp-eagle
server2 no dr aix 5300-05-03 9119-595 20-18888 yes ftp-eagle...
19,442
Posted By praveenbvarrier
Trap key press in a script
How can I trap a character press in the shell script.
For eg:- I have a script runinng a infinite loops , I will need to quit if q is pressed.

I have seen the traping the signal , but they give...
2,461
Posted By praveenbvarrier
Yep That worked , Great Thanks for all the help
Yep That worked , Great Thanks for all the help
2,461
Posted By praveenbvarrier
Thats correct , but here we manually never know...
Thats correct , but here we manually never know its 1st , 5th & 2nd cols to be extracted , so i will need this to be put it in the variables and use those variables in awk , how can we do that ?
2,461
Posted By praveenbvarrier
name1 yes no yes test test2 name2 no no yes...
name1 yes no yes test test2
name2 no no yes prod test3


so if the request comes to get 1st , 5th and 2nd in sequence then the o/p should be

name1 test yes
name2 prod no


And here the...
1,782
Posted By praveenbvarrier
Try replacing -e with -f
Try replacing -e with -f
2,461
Posted By praveenbvarrier
Need help in extracting columns
Hi ,

I have a file having around 8 columns spereated by space . Now that I need to extract columns from this. The problem is this functionality is needed in a script and the required columns...
Showing results 1 to 17 of 17

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