I'm trying to get the value in the first column as shown below using awk or cut but I don't seem to get it.
7 ? Jun 18 23:31 test3folder1/
I only need the number 7 in the above output to store in a variable. How do I do this? The above is the output of the "svn ls" command.
awk '{print $1}'
'awk' strips by one or several consecutive delimiters (space in your case), while 'cut' always strips by single delimeter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With