[Gllug] Making filenames 'FAT-safe' in bash

- Tethys tethys at gmail.com
Tue Nov 30 14:57:17 UTC 2010


On Tue, Nov 30, 2010 at 2:48 PM, Dylan <dylan at dylan.me.uk> wrote:

> On Tuesday 30 Nov 2010, - Tethys wrote:

> That's great, thanks - but it also removes the / between directory names and
> the final . before the filoe extension ...

Ahhh. Yes, that's because it's part of a larger script and only
operates on the basename of a given file. Change the last line to:

	sed 's,[^0-9a-z_./],,g;s/__*/_/g'

Tet

-- 
"Any sufficiently advanced financial instrument is indistinguishable from fraud"
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list