I am reading a file and cutting a column based on some logic. My issue is I am not able to cut a column with space.
This is the code for testing –
st="1|alalhabad|up|tushar|kesarwani|90| mls k|19990|india|420|24|m" HardErrorCheckColumnValue=`echo $st | cut -d'|' -f7` echo $HardErrorCheckColumnValue
The output should be –
But I am getting-
How do I make it not trim the leading or trailing spaces? It should give space, even if it contains only space.