[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Off Topic - Bash Question
- From: Chris Adams <cmadams hiwaay net>
- To: Fedora List <fedora-list redhat com>
- Subject: Re: Off Topic - Bash Question
- Date: Tue, 28 Sep 2004 15:03:20 -0500
Once upon a time, Bill Gradwohl <bill ycc com> said:
> # This works
> fileName='abc.xyz'
> md5sum=$(md5sum ${fileName})
>
> # This doesn't
> fileName='spaces in file name.xyz'
> md5sum=$(md5sum ${fileName})
# How about
fileName='spaces in file name.xyz'
md5sum=$(md5sum "${fileName}")
The key is that you need to put quotes around the file name (using
double quotes; single quotes block variable expansion).
--
Chris Adams <cmadams hiwaay net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]