With sed, what is a one liner to print the first n characters. I am doing the following.
grep -G 'defn -test.*' OctaneFullTest.clj | sed ....
With sed, what is a one liner to print the first n characters. I am doing the following.
grep -G 'defn -test.*' OctaneFullTest.clj | sed ....
Don't use sed, use cut.
grep .... | cut -c 1-N
If you MUST use sed:
grep ... | sed -e 's/^\(.\{12\}\).*/\1/'
For more complex processing, I recommend writing a quick awk script. It's a handy skill to have from time to time. Sorry no code right now. But that is easy in awk.