Search Results

Search: Posts Made By: mac-arrow
2,074
Posted By nezabudka
in double quotes, the shell can handle some...
in double quotes, the shell can handle some characters.
\x27 this is a hexadecimal representation of the character '
2,074
Posted By vgersh99
sed "s/=\([^ ;][^ ;]*\)/='\1'/g" myFile
sed "s/=\([^ ;][^ ;]*\)/='\1'/g" myFile
2,263
Posted By disedorgue
Hi, awk '/^-- Current Database:/...
Hi,



awk '/^-- Current Database:/ {A++}{print A" "$0}' ==> put a flag (a number follow of space) on each line of each Database block. for a given block, we have the same flag on each line,...
2,263
Posted By Don Cragun
Please try RudiC's code the way he presented it. ...
Please try RudiC's code the way he presented it.

You introduced syntax errors when you combined lines that RudiC had as separate lines in post #5 in this thread.
2,263
Posted By RudiC
Try also awk ' /-- / {if (cmd) close (cmd) ...
Try also
awk '
/-- / {if (cmd) close (cmd)
print
cmd = "sort | uniq -c | sort -k1,1r -k2"
next
}
{print | cmd
}

END {close (cmd)
...
2,263
Posted By disedorgue
It's a little few hard and the result is little...
It's a little few hard and the result is little few different (highest number then highest aphabetic so) :
awk '/^-- Current Database:/ {A--}{print A" "$0}' /tmp/file.txt | LC_COLLATE=C sort | uniq...
2,263
Posted By disedorgue
Hi, Maybe as: awk '/^-- Current Database:/...
Hi,
Maybe as:
awk '/^-- Current Database:/ {A++}{print A" "$0}' file.txt | LC_COLLATE=C sort | uniq -c | sed 's/ *\([0-9]\+\) [0-9]\+ /\1 /;/-- Current Database:/s/^[0-9]\+ //'
Regards.
Showing results 1 to 7 of 7

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