touching a file which contains slash char


 
Thread Tools Search this Thread
Top Forums Programming touching a file which contains slash char
# 1  
Old 09-25-2006
touching a file which contains slash char

i need to create a file which contains (/) character.

Any help to do this
axes
# 2  
Old 09-25-2006
If you mean that you want the file name to contain a slash, you are out of luck. The system calls all will intrepret a slash to indicate a directory name. So if you try to create, say, "a/b", the kernel will expect a directory called "a" to be present and will try to create a file called "b" in it.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Inspecting leading char in string for slash

In a SCO Unix shop, I am working on the following script to move any file to its same location on the target machine (called 'othersy' here): pwd=`pwd` for i in "$@" do echo " $i " if ; then echo 1; else echo 0; fi rcp -p $i othersy:$pwd/$i echo "Finished with ^ If I find a file... (4 Replies)
Discussion started by: wbport
4 Replies

2. Shell Programming and Scripting

Double slash into a file

I need to add double slash into a file using "echo" command. I tried the below from the command line and it worked. echo "\\\\abcd\efgh" > file more file \\abcd\efgh but if i use the same command within a script its showing only 1 slash Pls help (2 Replies)
Discussion started by: gpk_newbie
2 Replies

3. Shell Programming and Scripting

remove commas if touching any letters

I have a csv file that I am trying to edit. I need to remove any comma that is touching a letter. I used this command to find them. grep , moz_places_good.csv | head -n 10 | grep ,I would think I could use some form of this to just delete the commas and not the letter before it. Just not sure... (5 Replies)
Discussion started by: cokedude
5 Replies

4. Shell Programming and Scripting

rouch acts strange after touching around

hi there Strange title? Well yes...it is strange..."touch" is driving me nutts! Trying to set the access / modified date by a bash script. For a certain time everything works well with all files. After point x the code works only for some files, for others it doesn't. After looking for the ... (4 Replies)
Discussion started by: blah0
4 Replies

5. UNIX for Dummies Questions & Answers

Touching files?

So, I think this is a really stupid question, but I'd like to see if I am right. If the following commands are entered: umask 000 touch file1 umask111 touch file2 ...nothing should happen...right? The touch operation isn't going to apply any changes from umask to file1 (and same to... (1 Reply)
Discussion started by: Midwest Product
1 Replies

6. Shell Programming and Scripting

stdout to file or character device with trailing slash

I have an interesting one for the gurus out there that may have an idea as to why this is happening. We're currently migrating from Solaris 9 to Solaris 10 and we've run into a very strange issue. There are a bunch of shell scripts people have written throughout a directory that are used for... (4 Replies)
Discussion started by: dcarrion87
4 Replies

7. Shell Programming and Scripting

How to replace comma by slash using sed in an UTF8 file

Hello all, I'd like to replace "," by "/" in a utf8 file from postion X to Y. Comma "," is also defined as delimiter. 12345678901234567890,123456789012345,12345678901234567890, aaaa,aaaa,aaaaa ,bbb,bbbb,bbbbb ,cccccc,cc , Result should be... (1 Reply)
Discussion started by: fmofmo
1 Replies

8. Shell Programming and Scripting

Using sed to append backward slash before forward slash

Hi all, I need to know way of inserting backward slash before forward slash. My problem is that i need to supply directory path as an argument while invoking cshell script. This argument is further used in script (i.e. sed is used to insert this path in some file). So i need to place \ in front... (2 Replies)
Discussion started by: sarbjit
2 Replies

9. UNIX for Advanced & Expert Users

Substitute single backward-slash with the double backward-slash

Hi, I have a path like this c:\test\sample\programs, i need to change thiis to c:\\test\\sample\\programs. How to perform this? I tried tr command but it didn't help me. Thanks Vijayan (3 Replies)
Discussion started by: mvictorvijayan
3 Replies
Login or Register to Ask a Question