hy all,
i need case with input like this
1::||10334|11751|
2::10324|17541|||
i want output like this
1::||1033411751|
2::1032417541|||
how i can do that for get like output
thx before your advice
hy all,
i need case with input like this
1::||10334|11751|
2::10324|17541|||
i want output like this
1::||1033411751|
2::1032417541|||
how i can do that for get like output
thx before your advice
I think this sed should do the trick:
# bsd style sed
sed -E 's/(.*[0-9])(\|)([0-9].*)/\1\3/' input-file >output-file
# gnu style sed
sed -r 's/(.*[0-9])(\|)([0-9].*)/\1\3/' input-file >output-file
thx men for your advice:b:
perl -pe 's/(?<=[0-9])\|(?=[0-9])//' infile
sed 's/\([0-9]\)|\([0-9]\)/\1\2/' infile