Re: How do I get a list of filenames with spaces on bash?
- From: jellybean stonerfish <stonerfish@xxxxxxxxxxxxx>
- Date: Thu, 24 Jan 2008 07:17:00 GMT
On Wed, 23 Jan 2008 20:42:46 -0800, Chad wrote:
A long time ago, some Professor used some kind of 'echo' combination on
Unix to get a list of filename with space. I no longer have a copy of
the script.
I was tried something like the following
[cdalten@localhost ~]$ echo */
In bash you could use
[cdalten@localhost ~]$ ls *\ *
Note that is a \ not a /
The \ makes the shell treat the following space like a regular
character, not a word separator.
If you prefer to use echo
[cdalten@localhost ~]$ echo *\ *
Would also work, but the filenames would all come
out on one line, making them hard to read.
What do you want to do, just list filenames with spaces, or do something
to the filenames with spaces?
.
- Follow-Ups:
- Prev by Date: Re: Arrays doubts in KSH
- Next by Date: Re: script doubt
- Previous by thread: Re: How do I get a list of filenames with spaces on bash?
- Next by thread: Re: How do I get a list of filenames with spaces on bash?
- Index(es):
Relevant Pages
|