[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Command line mounting all partitions of pluggable device



On Lu, 20 mai 19, 09:31:05, Greg Wooledge wrote:
> On Sun, May 19, 2019 at 02:20:19PM +0300, Andrei POPESCU wrote:
> >     for $dir in /media/removable/*
> >     do
> >         mount /dev/disk/by-label/$dir /media/removable/$dir
> >     done
> 
> for dir in /media/removable/*
> do
>     mount /dev/disk/by-label/"$dir" /media/removable/"$dir"
> done
> 
> Note the lack of $ in the first line.  That's a fatal bug.
 
It was late... early... Sunday :p

> The quotes around "$dir" in the third line should be used, but if you
> forget them, it'll *probably* still work in most cases, because your
> directory names probably don't contain spaces or glob characters.
> Until that day in the distant future when all of a sudden, they do,
> and everything falls down.

As I said "(with appropriate quoting, etc.)".

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

Attachment: signature.asc
Description: PGP signature


Reply to: