Mailinglist Archive: opensuse (3280 mails)

< Previous Next >
Re: [opensuse] Need help doing a batch conversation lf - cr/lf
  • From: Philipp Thomas <pth@xxxxxxx>
  • Date: Fri, 7 Dec 2007 16:08:07 +0100
  • Message-id: <20071207150807.GN22750@xxxxxxxxxxxxxxxx>
* 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
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups