Search Results

Search: Posts Made By: dinesh1985
1,693
Posted By guruprasadpr
Hi awk 'substr($0,6) ~ /^[a-z0-9A-Z]+$/'...
Hi

awk 'substr($0,6) ~ /^[a-z0-9A-Z]+$/' file

Guru.
3,891
Posted By ahamed101
Try this awk -F"|" 'NR==FNR{a[$0]}{if($2 in...
Try this

awk -F"|" 'NR==FNR{a[$0]}{if($2 in a){print}} file2 file1regards,
Ahamed
3,891
Posted By danmero
awk 'NR==FNR{++a[$0]}a[$3]' file2 file1
awk 'NR==FNR{++a[$0]}a[$3]' file2 file1
1,263
Posted By radoulov
awk '{ n = substr($0, 1, length - 8) r =...
awk '{
n = substr($0, 1, length - 8)
r = substr($0, length - 7)
if (++t[n] <= 2) {
d = d ? d r : r
if (t[n] == 2) {
print n d; d = x
}
}
}' infile
6,693
Posted By Scrutinizer
Try: awk...
Try:
awk '{split(val,V,"");for(i=0;i<=p2-p1;i++)$(i+p1)=V[i+1]}1' val=newstring p1=10 p2=18 FS= OFS= infile
input:
01MRRAJESH21000RAJESH INDUSTRIES
output:
01MRRAJESnewstringESH INDUSTRIES
6,693
Posted By guruprasadpr
Hi Assuming ABCEFG is the string to be...
Hi

Assuming ABCEFG is the string to be replaced with:

echo 01MRRAJESH21000RAJESH INDUSTRIES | sed 's/\(.\{15\}\)RAJESH\(.*\)/\1ABCEFG\2/'

Guru.
8,493
Posted By zaxxon
$> sed -n 's/.* \(SQLSTATE=[0-9]\+\)/\1/p' infile...
$> sed -n 's/.* \(SQLSTATE=[0-9]\+\)/\1/p' infile
SQLSTATE=42603

or

awk '/SQLSTATE=/ {print $NF}' infile
SQLSTATE=42603
Showing results 1 to 7 of 7

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