Search Results

Search: Posts Made By: binary1
1,022
Posted By binary1
Hi raghur77, If you want to replace ? with...
Hi raghur77,

If you want to replace ? with /?, try this:

url="http://html.net/page.php?id=1254"
echo $url | sed 's:\?:/&:g'

Or if you want to match with page.php, you can use, echo $url |...
2,137
Posted By binary1
Hi, If you don't mind an AWK solution: ...
Hi,

If you don't mind an AWK solution:

for str in 81UV78UV183UV89800 8U1UVV78UUV18UU3UV89800
do
echo $str | awk -F'UV' '{for (i=1;i<=NF;i++)if($i != "")print $i}'
done
81
78
183
89800...
3,488
Posted By binary1
Hi, One more AWK solution, which uses '*' as...
Hi,

One more AWK solution, which uses '*' as delimiter.


awk -F"*" '{for (i=2;i<=NF+1;i++){if ($i != "" && $i !~ /None/){gsub(/ *$/,"",$i); printf "%s\n", $i}}}' file
Administrators
Backup...
4,542
Posted By binary1
Hi, One more awk command if you dont mind: ...
Hi,

One more awk command if you dont mind:


awk '{if($NF!= "|")$NF=($NF"|");print}' FS="" OFS="" file
1|John|32|US|
2|Matt|35|UK|
3|Rex|36|EU|
1,586
Posted By binary1
Hi Robin, Thank you for pointing out. Missed...
Hi Robin,

Thank you for pointing out. Missed that.:(

awk -F'=' '{q="\047";gsub(/[\047 ]|ssh/,X,$2);split($2,S,"@");if (S[2] !~ /^[0-9]/){t=S[2];S[2]=S[1];S[1]=t};print $1,FS,q,"ssh...
1,586
Posted By binary1
Hi, Try this: cat one alias...
Hi,

Try this:


cat one
alias server.domain.com='ssh 192.168.1.1@user1 '
alias server1.domain.com='ssh user2 @192.168.1.1'
alias server1.domain.com='ssh user3@192.168.1.1'

awk -F'='...
1,166
Posted By binary1
Hi, This is my first answer. Please be...
Hi,

This is my first answer. Please be gentle :). I tried the below code in my system that runs on centos7 and it worked.
cat one
dn: cn=m.hariharan,cn=employee,cn=delhi...
Showing results 1 to 7 of 7

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