Perfect timing again. We just started learning how to digest logs and were told to look at the awk, sed, and cut commands. You just finished the trifecta, thank you and I don't know if I said it before but congratulations on having over 1k subs.
In my case, I’m looking for the last 8 bytes of lines with variable length. At the moment I’m thinking grep (maybe sed?) with a positional parameter. We’ll see.
Fantastic question! Here is one possible way of doing it: since cut doesnt have a specifier for selection from the end of the line, you can use the "rev" command to reverse the line, then select the bytes you want, then reverse the line again: $ rev inputfile.txt | cut -b 1-8 | rev Like I've mentioned many times, there are MANY ways of doing any task in Linux. Any viewers have another way of doing this using cut or other tools? Please post and share
Great video... well done - not seen any other language sets tackled before in other videos. Really interesting.
Thank you for the compliments! I have had cases from all over the world so I actually had to work with those other languages.
Perfect timing again. We just started learning how to digest logs and were told to look at the awk, sed, and cut commands. You just finished the trifecta, thank you and I don't know if I said it before but congratulations on having over 1k subs.
so glad that these videos are helpful. and thanks for helping me reach 1k subs!
In my case, I’m looking for the last 8 bytes of lines with variable length. At the moment I’m thinking grep (maybe sed?) with a positional parameter. We’ll see.
Fantastic question! Here is one possible way of doing it:
since cut doesnt have a specifier for selection from the end of the line, you can use the "rev" command to reverse the line, then select the bytes you want, then reverse the line again:
$ rev inputfile.txt | cut -b 1-8 | rev
Like I've mentioned many times, there are MANY ways of doing any task in Linux. Any viewers have another way of doing this using cut or other tools? Please post and share
Thank you for the clarification, Blue Monkey. Good job. Like, Subscribe :)
P.s. Jak Spravy means How are you doing ;)
Ласкаво просимо! Laskavo prosimo!
Pog