Search Results

Search: Posts Made By: devtakh
3,136
Posted By devtakh
Use cut command. IFS=' ' while read a b ...
Use cut command.

IFS=' '
while read a b
do
echo "a is $a"
dirname=`echo $a | cut -c 1-5`
echo $dirname
echo "b is $b"
done < $HOME/my.lst


cheers,
Devaraj Takhellambam
3,136
Posted By devtakh
IFS=' ' while read a b do echo "a is $a" ...
IFS=' '
while read a b
do
echo "a is $a"
echo "b is $b"
done < $HOME/my.lst


cheers,
Devaraj Takhellambam

pludi: Please use code tags even for short listings
Showing results 1 to 2 of 2

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