I'm using rhel7 and trying to print my output from shadow for example to be like this :
test1 !!
test2 !!
test3 *
I am running this command:
i=`cat /home/mydir/shadow1 |awk -F ':' '{print $1,$2}' `
When I do echo $i
, it will print the output in 1 line:
test !! test2 !! test3 *
Can anyone advice how should I modify my '{print $1,$2}'
so that it will print a new line?
passwd --status
– Chris Davies Jan 26 '21 at 08:25$( command )
syntax instead – Chris Davies Jan 26 '21 at 08:26i
for anything else? If not, there's no point in having it at all. Justawk ... shadow1
. – Kusalananda Jan 26 '21 at 09:31