Search Results

Search: Posts Made By: gizmo16
2,175
Posted By Scott
A more vague request I've never seen! Please...
A more vague request I've never seen!

Please follow the rules for posting here.

Closed.
2,196
Posted By Corona688
as in, make the console go backwards? This...
as in, make the console go backwards?

This can vary depending on your terminal since it's not a standard feature, but the escape sequence "ESC M" moves the terminal up one line in at least some.
...
11,313
Posted By ahamed101
awk -v start=$whatever -v end=$wherever...
awk -v start=$whatever -v end=$wherever 'NR==start,NR==end' file.txt


or


sed -n "$start,$end p" file.txt


--ahamed
11,313
Posted By Franklin52
No need to use cat...
No need to use cat (http://partmaps.org/era/unix/award.html):
awk -v s=$start -v e=$end 'NR==s,NR==e' file
33,537
Posted By ahamed101
You mean something like this? ...
You mean something like this?


line_no=$(awk '{x++} END {print x}' filename)
echo $line_no


--ahamed

PS : Please use code tags. Thank you for your co-operation.
Showing results 1 to 5 of 5

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