Search Results

Search: Posts Made By: bhupinder08
2,960
Posted By Scrutinizer
Yes.
Yes.
2,960
Posted By RudiC
Strange. Works in bash on linux and (Free)BSD.cat...
Strange. Works in bash on linux and (Free)BSD.cat file
upg_prod_test
upg_prod_new

sed "s/[ "$'\t'"]$//" file
upg_prod_test
upg_prod_new

sed 's/[ ]$//' file
upg_prod_test...
2,960
Posted By MadeInGermany
spc=`printf '[ \t]'` <a.txt sed...
spc=`printf '[ \t]'`
<a.txt sed 's/'"$spc"'$//'
2,102
Posted By Klashxx
Another way: perl -e 'foreach (reverse <>){ if...
Another way:
perl -e 'foreach (reverse <>){ if (/START/){print reverse(@a);exit};if (/END/ .. /START/){push (@a,$_) unless /END/}}' infile
2,102
Posted By msabhi
awk '{if($0~/START/){i=NR-1;}a[j++]=$0;}...
awk '{if($0~/START/){i=NR-1;}a[j++]=$0;} END{while(i!=j)print a[i++]}' input_file


I feel there is a better solution than the above :rolleyes:
2,102
Posted By elixir_sinari
awk '/START/{p=1;sect=""}p{sect=sect?sect RS...
awk '/START/{p=1;sect=""}p{sect=sect?sect RS $0:$0}/END/{p=0}END{print sect}' file
4,775
Posted By ctsgnb
which range of value do you need to match ? ...
which range of value do you need to match ?

or which values do you need to match ?

---------- Post updated at 07:27 PM ---------- Previous update was at 07:14 PM ----------

$ cat tst
ABC 1...
Showing results 1 to 7 of 7

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