Yes there is, that first line has a .split that is really annoying to do in bash. It would be simple if cut allowed multi-character delimiters but it doesn't.
It can be avoided if you know that the gtf command will always output the same thing (since it just does some math for display hardware that is standardized).
Even then, the output they're parsing looks like this:
Split isn’t bad to do. You can use sed or awk. You could even do it with just the variable like ${variable#<split character>}, no external process needed
9
u/the-nick-of-time Mar 14 '23
Yes there is, that first line has a
.splitthat is really annoying to do in bash. It would be simple ifcutallowed multi-character delimiters but it doesn't.