Unix Shell - Re: showing content of a list of files ?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > June 2006 > Re: showing content of a list of files ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: showing content of a list of files ?
Stephane CHAZELAS

2006-06-20, 7:26 am

2006-06-20, 00:01(+00), Carl Lowenstein:
[...]
> Has nobody yet thought of the ancient solution to this problem, using a
> semi-undocumented side-effect of more(1)? And two useful uses of cat(1).
>
> $ more $(cat index_file) | cat


Again

IFS='
'
set -f
more -- $(cat index_file) | cat

if index_file is a newline separated list of file paths.

Or with GNU head and xargs:

xargs -d '\n' < index_file head -n -0

--
Stéphane
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com