Computing.Net > Forums > Unix > Character substitution

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Character substitution

Reply to Message Icon

Name: marion
Date: September 29, 2005 at 04:13:01 Pacific
OS: AIX 5.2
CPU/Ram: don't know
Comment:

Hi all.

I have to put the full path of a file into its name.
The problem is that unix won't accept the character "/" in the filename, so I have to substitute it with something else.
How can I do it via scripting?

I would be very grateful for any help!!

Thanks a lot,

Marion



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: September 29, 2005 at 07:27:36 Pacific
Reply:

I don't understand your comment "that unix won't accept the character '/'". Typically, you escape the / meaning \/ to take away the special meaning.


0

Response Number 2
Name: marion
Date: September 30, 2005 at 01:44:40 Pacific
Reply:

I've already tried. It doesn't work.

For example:
$ touch \/me
touch: 0652-046 Cannot create /me.

Any other ideas?
Thanks very much!!

Marion


0

Response Number 3
Name: Jim Boothe
Date: September 30, 2005 at 06:19:06 Pacific
Reply:

touch /me is trying to create a file in the root directory. Maybe you do not have write permissions in the root directory?

The forward slash does not need to be escaped when dealing with path and file names.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Character substitution

vi \ ex : Substitute with newline? www.computing.net/answers/unix/vi-ex-substitute-with-newline/6485.html

SED using special characters www.computing.net/answers/unix/sed-using-special-characters/4804.html

Perl substitution. www.computing.net/answers/unix/perl-substitution/6967.html