Mailinglist Archive: opensuse (3280 mails)

< Previous Next >
Re: [opensuse] Need help doing a batch conversation lf - cr/lf
  • From: Randal Jarrett <rsj@xxxxxxxxx>
  • Date: Fri, 07 Dec 2007 12:56:01 -0500
  • Message-id: <1197050161.5518.5.camel@xxxxxxxxxxxxxxx>

Thanks for the info. I'll add it to the rest of the replies and try to
come up with something
that will work.

On Fri, 2007-12-07 at 16:08 +0100, Philipp Thomas wrote:
* Randal Jarrett (rsj@xxxxxxxxx) [20071207 06:00]:

get file, convert file, put file in the same subdir as original but in
new structure.

Something like;

pushd <old top_dir>
for f in "$(find <old top dir> -type f)"; do
destdir=<new top_dir>/$(dirname $f)
file=$(basename $f)

if [ ! -d $destdir]; then
mkdir -p $destdir
fi
unix2dos $f $destdir/$file
done
popd

Philipp
--

Randal Jarrett <rsj@xxxxxxxxx>
RSJ Consulting, Inc
Hernando, FL
(352) 419-0112



--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >