Sponsored Content
Top Forums UNIX for Advanced & Expert Users Substitute single backward-slash with the double backward-slash Post 302328869 by mvictorvijayan on Thursday 25th of June 2009 10:49:23 AM
Old 06-25-2009
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
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find the current cursor word in backward

hello, i'm using the vi editor (not vim) and my main use in it is for C++ programming. After working on Visual Studio 2005 the auto-complete looks like paradise now... so i'm trying to find a way to have auto-complete also in the vi. i cant install vim and use the ctrl+P. i need to find a way... (1 Reply)
Discussion started by: Malbinir
1 Replies

2. Shell Programming and Scripting

forward/backward capable prompt

Hi, I would like to construct an interactive prompt for a series of bash shell scripts. This prompt will ask the user a series of questions, and the answers will determine which scripts are run, and in which order. I am familiar with the "read" command, and have successfully constructed a... (2 Replies)
Discussion started by: msb65
2 Replies

3. 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

4. SCO

sco unix backward compatibility on "max open file per process"

Hi How to increase maximum number of open file in "sco xenix binary" running in "sco unix openserver 5.0.7" ? I have changed "NOFILES" kernel parameter to 512, but xenix binray can't open more than 60. tnx (4 Replies)
Discussion started by: javad1_maroofi
4 Replies

5. Shell Programming and Scripting

backward string cut

I need only the last .ko files to be stripped from the whole result., ie libiscsi2.ko, scsi_transport_iscsi2.ko etc.. kernel/drivers/scsi/libiscsi2.ko kernel/drivers/scsi/scsi_transport_iscsi2.ko kernel/drivers/scsi/scsi_transport_iscsi.ko kernel/fs/nls/nls_utf8.ko... (4 Replies)
Discussion started by: anilcliff
4 Replies

6. UNIX for Dummies Questions & Answers

Help With Backward grep

hey, i got 2 files with the following content: file1: LOCAL_GSK1 50:01:24:80:45:f1:15:23 50:01:24:81:45:f1:15:23 50:01:24:82:45:f1:15:23 50:01:24:83:45:f1:15:23 LOCAL_GSK2 50:01:24:82:00:9c:d7:a7 50:01:24:82:01:bc:d7:a7 50:01:24:82:02:dc:d7:a7 50:01:24:82:03:fc:d7:a7 LOCAL_GSK3... (1 Reply)
Discussion started by: boaz733
1 Replies

7. Programming

Backward compatibility in python

Actually I have installed python 3.2. It seems there are a lot of synta variance between 2.2 and 3.2. Is it possible to run a script in 2.2 without actually installing 2.2. But I have installed 3.2. and also is it possible to access the 2.2 shell in 3.2 version. I am naive in python . Please... (1 Reply)
Discussion started by: pandeesh
1 Replies

8. 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

9. Shell Programming and Scripting

Backward compatibility issue with GNU bash, version 4.3.42(5)

Hi, I have made a snake game on below bash version. But it is not backward compatible. Can someone suggest a version which is most commonly used and is backward compatible so that i can change my code and share again? I have attached the game script. If someone can run it please also suggest... (5 Replies)
Discussion started by: amit14august
5 Replies
basename(1)						      General Commands Manual						       basename(1)

NAME
basename, dirname - extract portions of path names SYNOPSIS
string [suffix] [string] DESCRIPTION
deletes any prefix ending in and the suffix (if present in string) from string, and prints the result on the standard output. If string consists entirely of slash characters, string is set to a single slash character. If there are any trailing slash characters in string, they are removed. If the suffix operand is present but not identical to the characters remaining in string, but it is identical to a suf- fix of the characters remaining in string, the suffix is removed from string. is normally used inside command substitution marks within shell procedures. delivers all but the last level of the path name in string. If string does not contain a directory component, returns indicating the cur- rent working directory. EXTERNAL INFLUENCES
Environment Variables determines the interpretation of string and, in the case of basename, suffix as single and/or multi-byte characters. If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari- able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization variable contains an invalid setting, and behave as if all internationalization variables are set to "C". See environ(5). International Code Set Support Single- and multi-byte character code sets are supported. EXAMPLES
The following shell script, invoked with the argument compiles the named file and moves the output to a file named in the current direc- tory: The following example sets the shell variable to RETURN VALUE
and return one of the following values: Successful completion. Incorrect number of command-line arguments. SEE ALSO
expr(1), sh(1). STANDARDS CONFORMANCE
basename(1)
All times are GMT -4. The time now is 10:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy