[NYLoCo] Bash Line Breaks
Jeffrey Knight
jeffrey.knight at gmail.com
Fri Sep 14 19:17:04 BST 2007
Hi Gavin
That's a great example (trick) but it'd break down with:
s="<?xml version=\"1.0\"?>
<hello-world>hi there</hello-world>"
echo $s
<?xml version="1.0"?> <hello-world>hi there</hello-world>
It looks like columns takes an argument (-s) for what to split on ...
but now it's starting to feel like a workaround.
On 9/14/07, gavin silver <gavindsilver at gmail.com> wrote:
> root at mail:~# files=$(ls -1)
> root at mail:~# echo $files
> authfails.txt backup debug messages.1.gz messages.2.gz messages.3.gz
> messages.4.gz messages.5.gz messages.6.gz test
> root at mail:~# echo -e "$files" | column -ntx -s" "
> authfails.txt
> backup
> debug
> messages.1.gz
> messages.2.gz
> messages.3.gz
> messages.4.gz
> messages.5.gz
> messages.6.gz
> test
> root at mail:~#
>
>
More information about the Ubuntu-us-ny
mailing list