Operating System - Linux
1753925 Members
8799 Online
108810 Solutions
New Discussion юеВ

Re: File handling to fetch records

 
SOLVED
Go to solution
Panpalia
Occasional Advisor

Re: File handling to fetch records

Once again Thanks everyone.
The following answer solve my issue.
$awk '0+substr($0,1,4)>500' filename
Anyone please explain how this command work.
Dennis Handly
Acclaimed Contributor

Re: File handling to fetch records

$awk '0+substr($0,1,4)>500' filename
>Anyone please explain how this command work

Hein already did. If the first 4 chars are > 500 (the pattern) then print the record (the action).
If that's too cryptic look at my awk solution where the steps are explicit as in a procedural language.
Panpalia
Occasional Advisor

Re: File handling to fetch records

I got the right solution.
Peter Nikitka
Honored Contributor

Re: File handling to fetch records

Hi,

if you thank everyone: why not submits points to them ;-) ?

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"