escape chracters

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting escape chracters
# 1  
Old 12-18-2007
escape chracters


how to echo \\ in unix

ie echo the path


# 2  
Old 12-18-2007
echo '\\' is good enough. If you have dir1, dir2 et al as variables, do this

echo ${dir1}'\\'${dir2}'\\'${dir3}

# 3  
Old 12-18-2007
i need \\ at the beginning of the path

# 4  
Old 12-18-2007
echo "\\\\\\"

echo '\\\'

and then the rest..
# 5  
Old 12-18-2007
how to display echo "\\\\\rxfile01"

as \\rxfile01
# 6  
Old 12-18-2007
echo '\\\\rxfile01'

# 7  
Old 12-18-2007
i am pretty confused with the question
if you want to echo \\rx.txt without using any escape sequence

echo '\\rx.txt'

If u want to use esacpe sequence

echo "\\\\rx.txt"

Rakesh UV
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Modification of perl script to split a large file into chunks of 5000 chracters

I have a perl script which splits a large file into chunks.The script is given below use strict; use warnings; open (FH, "<monolingual.txt") or die "Could not open source file. $!"; my $i = 0; while (1) { my $chunk; print "process part $i\n"; open(OUT, ">part$i.log") or die "Could... (4 Replies)
Discussion started by: gimley
4 Replies

2. UNIX for Beginners Questions & Answers

Extract string between two special chracters

Hi Folks - I'm trying to extract the string between two special characters, the "-" and "." symbols. The string format is as such: _PBCS_URL_PRD= _PBCS_URL_TST=https://pln-test-a503777.pbcs.us6.ocloud.comIn the above case, I need to extract "a503777".... (7 Replies)
Discussion started by: SIMMS7400
7 Replies

3. Shell Programming and Scripting

Help with escape in code

i want to add the code below to the end of every line in file4 im using this awk command to do this awk '{print $0"txt-to-print-here"}' file4 its not working because i think i need to escape the code please can someone show the right way thanks | sed 's~http*:/https:///~~g' > file1... (3 Replies)
Discussion started by: bob123
3 Replies

4. Shell Programming and Scripting

Escape Sequences

Hi Gurus, Escape sequences \n, \t, \b, \t, \033(1m are not working. I just practiced these escape sequences. It worked first. Later its not working. Also the command - echo inside the script editor shows as shaded by a color. Before that echo inside the script editor wont show like this.... (4 Replies)
Discussion started by: GaneshAnanth
4 Replies

5. Shell Programming and Scripting

Auto escape script to escape special chars in script args

This is a bit off the wall, but I often need to run scripts where there are argument values that contain special characters. For example, $ ./process.exe -t M -N -o temp.mol.s -i ../molfiles/N,N\',N\'\'-trimethylbis\(hexamethylene\)triamine.mol && temp.mol.s temp.s It... (1 Reply)
Discussion started by: LMHmedchem
1 Replies

6. Shell Programming and Scripting

Escape characters

i am executing script from A server which will execute the script in B server , as below. ssh A 'ssh B echo 'select * from testing where name ='test'' i am getting the below output. select * from testing where name=test but i need the output where clause with quotes , tried with... (3 Replies)
Discussion started by: expert
3 Replies

7. UNIX for Dummies Questions & Answers

tailing a file which contains Control chracters

Hi. I have a log file which gets updated by a java process and it uses ASCII STX and ETX characters (i.e CTRL-B and CTRL-C characters) to demarcate each XML message logged. so the format of the file is something like STX XML_MESSAGE1 .. .. ETX STX XML_MESSAGE2 .. .. ETX each XML... (4 Replies)
Discussion started by: gregoryp
4 Replies

8. Shell Programming and Scripting

How to escape from the shell

In a Script I need to push several messages to a function. My problem here is: I have to print the string v$LOCK on the resulting line which spits out the message. What I want here is not printing the contents of $LOCK I want to escape the shell and printout v$LOCK on the line. But don't know how... (3 Replies)
Discussion started by: sdohn
3 Replies

9. Shell Programming and Scripting

count the number chracters occurances in a line

Hi Could anybody tell me how to count the number of occurances of a character within a LINE. actually i have a single line with words seperated with '+' chracter e.g. abc+def+ghj+jkl+asd i want to separte the words above. Please provide the necessary logic in the form of a SHELL... (6 Replies)
Discussion started by: skyineyes
6 Replies

10. Shell Programming and Scripting

to see space, tab, end of the line chracters

what can I use ?? In vi, I can use :set list <-- and see end of line $.. or use cat -A but I am wondering if there is command or program that allows me to see all the hidden characters( space, tab and etc) Please help thanks. (3 Replies)
Discussion started by: convenientstore
3 Replies
Login or Register to Ask a Question