On Sun, Mar 08, 2015 at 11:21:41AM -0600, Eduardo A. Bustamante López wrote: > > alias rs="IFS=\ $'\x09'$'\x0a'" > > The fuck? Just use > alias rs="IFS=\$' \t\n'" or even better, alias rs='unset IFS'
rs() { IFS=$' \t\n'; } Aliases... my god, why? > > echo "1st try to split pth:" > > IFS=: echo $pth > This *obviously* doesn't work. See also http://mywiki.wooledge.org/BashFAQ/104 . If you want pth to be treated as a list, and get split into words, then store it as an array in the first place, and use "${pth[@]}" to extract the words. pth=(These are my "possibly space-including" words.) printf '<%s> ' "${pth[@]}"; echo There is no need to mess with IFS. Now, if you're talking about PATH and not pth, then there may be some reason. To convert PATH into an array of directories, use something like this: IFS=: read -ra pth <<< "$PATH" Then you can use "${pth[@]}" to extract the full list, etc.