Search Results

Search: Posts Made By: mohtashims
37,066
Posted By mohtashims
Unable to print last line in Linux in while loop
Below is my shell script:

printf "10\n-rwxr-xr-x 73\n-rwxr-xr-x 74\n10\n-rwxr-xr-x 75\n-rwxr-xr-x 76" |
while IFS=' '
read -r dirn
do
echo "dirn :"$dirn
done

Output:
$ ./test.sh...
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 01:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy