- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Space character in filename's
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2004 10:24 PM
тАО12-22-2004 10:24 PM
How can I "list" and process filenames with space(s) in the filename in a shell script?
Help...
Rgrds CvB.
Solved! Go to Solution.
- Tags:
- evil spaces
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2004 10:25 PM
тАО12-22-2004 10:25 PM
Re: Space character in filename's
On a HP-UX 11.11 (11i v1) rp4440 server..
Rgrds CvB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2004 10:36 PM
тАО12-22-2004 10:36 PM
Re: Space character in filename's
find / -name "* *" -print
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2004 10:37 PM
тАО12-22-2004 10:37 PM
Re: Space character in filename's
ll|cat -bv
ll|vis
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2004 10:39 PM
тАО12-22-2004 10:39 PM
Re: Space character in filename's
e.g. like this:
#!/usr/bin/sh
DIR_PATH="
ls "$DIR_PATH" | while read filename
do
echo "$filename"
echo "process $filename"
done
The qouting will probably do the trick.
regards,
John K.
- Tags:
- quoting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2004 10:41 PM
тАО12-22-2004 10:41 PM
Re: Space character in filename's
process "$i"
done
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2004 10:47 PM
тАО12-22-2004 10:47 PM
Re: Space character in filename's
Thanks for the quick reactions.
But how to change one or more "spaces" in a filename to a other character "_".
I need to pass the filename from one script ot an other including some more params.
- script_a:
ls -1 /dir/
Start-loop
./script_b
End-loop
Rgrds CvB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2004 11:04 PM
- Tags:
- tr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2004 12:45 AM
тАО12-23-2004 12:45 AM
Re: Space character in filename's
Rgrds CvB.