You are not logged in.
Pages: 1
Hi,
I want the tail command to output the end of a file up to a certain word/delimiter, is it possible? I know I can set set a certain line number, but that's flexible enough. I'm sure it can be done, I just not as familiar with linux commands just yet. Thanks for the help.
Vincent
Offline
You can try mixing the tail with grep and cut to do some more good
Offline
I found this among the sed one liners here : http://student.northpark.edu/pemente/sed/sed1line.txt
# print section of file from regular expression to end of file
sed -n '/regexp/,$p'
But the problem is that it does it from the first occurrence of the word / delimiter / regexp, which might not be what you want.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
shining,
Thank you, I think this might just be exactly what i'm looking forward, I try it and report back.
Vincent
Offline
awk 'BEGIN {RS="nonoccurring123332134" ; FS="the line"} {print $2}' filename
Offline
Pages: 1