Search Results

Search: Posts Made By: srinivas matta
1,117
Posted By srinivas matta
echo $a | sed "s/\./,/g"
echo $a | sed "s/\./,/g"
1,421
Posted By srinivas matta
Hi Reddy, sed "/server/d" $file If...
Hi Reddy,

sed "/server/d" $file

If you want to reflect the original file

sed -i "/server/d" $file
6,575
Posted By srinivas matta
echo $msg|sed "s/'//g"
echo $msg|sed "s/'//g"
1,595
Posted By srinivas matta
why can't we use paste command paste...
why can't we use paste command

paste $file1 $file2
1,756
Posted By srinivas matta
you can use this also sed -e "1~4s/^/AA...
you can use this also

sed -e "1~4s/^/AA /g" -e "2~4s/^/BB /g" -e "3~4s/^/CC /g" -e "4~4s/^/DD /g" $file
4,162
Posted By srinivas matta
you can google it also. grep -w
you can google it also.

grep -w
3,334
Posted By srinivas matta
Bob's code is correct. I didnt realize that there...
Bob's code is correct. I didnt realize that there are 2 and 4 characters. I thought that all the 3 character separations.

Thanks Bob
3,334
Posted By srinivas matta
use below code sed...
use below code


sed "s/^\(...\)\(...\)\(...\)\(.*\)/\1|\2|\3|\4/g" $file
2,202
Posted By srinivas matta
Below code will help to you. put all the...
Below code will help to you.

put all the ips in one file line by line.


while read ip
do
ssh -n ${ip} "cat $full path of sudoers" >> $output
done < $file
8,671
Posted By srinivas matta
hey, below command will help you. ...
hey,

below command will help you.

sed "s/NY \(.....\)/NY \1 USA/g" $file
1,488
Posted By srinivas matta
if the units are equl to 10 after id- then you...
if the units are equl to 10 after id- then you can use below code.


sed "s/id-........../my_datafile/g" $file > output
1,488
Posted By srinivas matta
hey, use the below sed command. sed...
hey,

use the below sed command.

sed -e "s/id-.* name\=\"/my_datafile name\=\"/g" -e "s/-id-.*\>/-my_datafile /g" -e "s/<\/id-.*/<\/my_datafile >/g" $file > $output
2,793
Posted By srinivas matta
hey Varma, please use the below code. ...
hey Varma,

please use the below code.

#This one-liner also starts with creating a named label "a". Then it tests to see if it is not the last line and appends the next line to the current one...
3,685
Posted By srinivas matta
Hey, you can use this also. ...
Hey,

you can use this also.

#iterating the sed command up to end
echo ...A.1.B.C.D.E.FX. | sed -e :a -e 's/\([A-Z]\{1\}\)\.\([A-Z]\{1\}\)/\1\. \2/;ta'
...A.1.B. C. D. E. FX.
1,904
Posted By srinivas matta
Anshaa, what was the logic behind your...
Anshaa,

what was the logic behind your output. How did you separate those output lines. then only we can help to you.
1,461
Posted By srinivas matta
Please try this, it will work grep ":"...
Please try this, it will work

grep ":" $file | sed "/00000000:00000000/d"
3,685
Posted By srinivas matta
Hi, you can use this also. sed "s/\./\....
Hi,

you can use this also.
sed "s/\./\. /g" $file

Reason: replace the "." with ". "

Video tutorial on how to use code tags in The UNIX and Linux Forums....
7,117
Posted By srinivas matta
we have some minor differences for linux to aix. ...
we have some minor differences for linux to aix.

I dont have aix server now to check, please try like this hope it will work fine to you.

sed "/ssh\|emagent/s/prohibit/aix/g" /etc/pam.conf >...
7,117
Posted By srinivas matta
Are you running this in linux sever only,right? ...
Are you running this in linux sever only,right?

which flavour of linux you are using. "-i" command is the well known command to me..am using this from past 3 yrs.
7,117
Posted By srinivas matta
I have tried the above command with your file...
I have tried the above command with your file data only. its working fine for me.
7,117
Posted By srinivas matta
What is the output with sed cammand??? ...
What is the output with sed cammand???

Please take a backup of /etc/pam.conf

try this once...

sed -i "/ssh\|emagent/s/prohibit/aix/g" /etc/pam.conf

open /etc/pam.conf file and check...
2,139
Posted By srinivas matta
Can you please explain more...do you need the...
Can you please explain more...do you need the symbolic link to .profile file or anything else.
7,117
Posted By srinivas matta
Hi, if you are unfamilier with awk, you can...
Hi,

if you are unfamilier with awk, you can use below sed command.

#search for lines start with ssh and emagent and replace prohibit with aix
sed "/ssh\|emagent/s/prohibit/aix/g" $file
1,328
Posted By srinivas matta
with out login credentials also you can do ssh (...
with out login credentials also you can do ssh ( I am using that right now). we can change the settings in one ssh file for this i didnt remember that exact file name. you can take the help from your...
1,328
Posted By srinivas matta
hi, Add the below code in your script ...
hi,

Add the below code in your script

#!/bin/ksh
file="/export/home/ABCDE/readIP.txt"
while read Line
do
ssh $line << EOF >output.sri
echo $line ":" who -b
EOF
done < $file
exit 0
...
Showing results 1 to 25 of 29

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