Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
No way. The content of a file can not be examined without reading it. And the content of a file can not be read without opening it.peac3 said:Just wondering how to find the line number for particular word within the file without opening the file because the file contains millions of record.
grep -n 'word' /input/file
sed -n '/word/=' /input/file
awk '/word/{print NR}' /input/file
perl -ne 'print"$.\n"if/word/' /input/file
ruby -ne 'puts$.if$_.match(/word/)' /input/file
grep -n -m 1 'word' /input/file
sed -n '/word/{=;q}' /input/file
awk '/word/{print NR;exit}' /input/file
perl -ne 'if(/word/){print$.;exit}' /input/file
ruby -ne 'if$_.match(/word/):print$.;exit;end' /input/file