echo "Input "
read line
echo $line | awk '{ for(i=1;i<=NF;i++)
print $i;
}'
OUTPUT:-
#!/bin/bash
#root@slack-linunx:~/scripts# ./userInput.sh
#Input
#Hello World
#Hello
#World
#root@slack-linunx:~/scripts#
read line
echo $line | awk '{ for(i=1;i<=NF;i++)
print $i;
}'
OUTPUT:-
#!/bin/bash
#root@slack-linunx:~/scripts# ./userInput.sh
#Input
#Hello World
#Hello
#World
#root@slack-linunx:~/scripts#
0 comments:
Post a Comment