Deutsch   English   Français   Italiano  
<yga34mfoily.fsf@akutech.de>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Ralf Fassel <ralfixx@gmx.de>
Newsgroups: comp.unix.programmer
Subject: Re: Long filenames in DOS/Windows and Unix/Linux
Date: Wed, 04 Sep 2024 11:47:53 +0200
Lines: 27
Message-ID: <yga34mfoily.fsf@akutech.de>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
	<ubg6o7$3jrsn$1@news.xmission.com> <ubg853$2ssj8$1@dont-email.me>
	<ubg8a8$2t20l$1@dont-email.me> <vaubbo$1d324$1@news.xmission.com>
	<vauknd$uvji$1@dont-email.me> <20240903084440.0000663d@gmail.com>
	<20240903103327.395@kylheku.com> <20240903113937.000008a3@gmail.com>
	<20240903130000.933@kylheku.com> <20240903132547.00000656@gmail.com>
	<87seug1iyj.fsf@nosuchdomain.example.com>
	<vb81vo$3g6hb$6@dont-email.me>
	<87o7541ggd.fsf@nosuchdomain.example.com>
	<vb87jr$3h6uk$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net htmwqWWA8HbBwhqaopRmzwAAG5KxGqzmxm2fA7OYFutIj6/XY=
Cancel-Lock: sha1:CrBV37DeTWVCA4qo3WwvGpZsV2g= sha1:Tsi67MWAvRKqnAvT2SNHPEECPIY= sha256:/dp9bKFV84Zh26ljImd6FT798orwsLhnAROVZ23NdBw=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Bytes: 2045

* Lawrence D'Oliveiro <ldo@nz.invalid>
| On Tue, 03 Sep 2024 16:10:42 -0700, Keith Thompson wrote:
>
| > Lawrence D'Oliveiro <ldo@nz.invalid> writes:
| >>
| >> On Tue, 03 Sep 2024 15:16:36 -0700, Keith Thompson wrote:
| >>>
| >>> For example, I might type something like:
| >>> 
| >>>     for file in * ; do cp -p $file $file.bak ; done
| >>
| >> It’s quite easy to fix that to work with spaces in file names.
| > 
| > I wouldn't call it "quite easy".
>
| As easy as this, in Bash at least:
>
|     IFS=$'\n'

Forgive my ignorance, but what is wrong with

  for file in * ; do cp -p "$file" "$file.bak" ; done

?  Works for both spaces and newlines in file names... (at least with
bash and ksh).

R'