Re: How do I get a list of filenames with spaces on bash?
- From: Chad <cdalten@xxxxxxxxx>
- Date: Thu, 24 Jan 2008 05:49:40 -0800 (PST)
On Jan 23, 11:17 pm, jellybean stonerfish <stonerf...@xxxxxxxxxxxxx>
wrote:
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?
I was trying to rename all the filenames with spaces in them.
.
- Follow-Ups:
- Re: How do I get a list of filenames with spaces on bash?
- From: Ed Morton
- Re: How do I get a list of filenames with spaces on bash?
- References:
- Re: How do I get a list of filenames with spaces on bash?
- From: jellybean stonerfish
- Re: How do I get a list of filenames with spaces on bash?
- Prev by Date: Re: How do I get a list of filenames with spaces on bash?
- Next by Date: Re: How i create a mulidimensional array ?
- 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
|