Search Results

Search: Posts Made By: louisJ
1,273
Posted By elixir_sinari
Possible. You could use match for the...
Possible.

You could use match for the required regexp and then get the required substring by substr using values of RSTART and RLENGTH and invoke gensub on this substring.

Please post a sample...
2,933
Posted By Scrutinizer
Try: sort -k1,1rn -k2r
Try:
sort -k1,1rn -k2r
2,933
Posted By bartus11
You should combine -n and -r into single sort:...
You should combine -n and -r into single sort: cat substitutionFeats.txt | gawk '{$0=gensub(/\t/,"blabla",1);print}' | gawk '{print length, $0}' | sort -rn
2,516
Posted By neutronscott
You need to group your "word" definition, and...
You need to group your "word" definition, and allow it to repeat. ( regex )*. I changed it to match spaces at the beginning instead of the end to simplify phrases that may be at the end of line..
...
2,914
Posted By
it's Perl not pearl lol Détente can be done too...
it's Perl not pearl
lol
Détente can be done too but i'm lazy for that
2,914
Posted By Scrutinizer
Correct that only works with space separation,...
Correct that only works with space separation, but at that point it wasn't clear that you were going to transform French ;)
4,511
Posted By Klashxx
If you want to go on with awk: awk...
If you want to go on with awk:
awk 'NR==FNR{a=substr($0,1,1);b[FNR]=match(a,/[A-Z]/) ? 1 : 0;next}
{c=substr($0,1,1);c=b[FNR] ? toupper(c):tolower(c);print c""substr($0,2)}' gauche.txt...
28,959
Posted By mirni
Or pipe find into a while loop: find....
Or pipe find into a while loop:

find. <whatyouneedtofind> | while read file ; do
<whatyouneedtodowith> "$file"
done
Showing results 1 to 8 of 8

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