Problem using echo command for text starting with /


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem using echo command for text starting with /
# 1  
Old 12-14-2009
Problem using echo command for text starting with /

Hi,

i need to print following text using echo:

/abc dir/c\

so i tried echo "/abc dir/c\

But it gives me error of Incorrect usage, i am using Hamilton cshell in windows Vista. Can any one please help me.

Thanks in advance
Sarbjit
# 2  
Old 12-14-2009
try this...
Code:
echo "/abc dir/c\\"

# 3  
Old 12-14-2009
Quote:
Originally Posted by vidyadhar85
try this...
Code:
echo "/abc dir/c\\"

Thanks for reply, but its not working. The issue is basically with first forward slash (/) because in hamilton / can be used in place of - for using other switches with echo command. Refer
Code:
 echo -h

in hamilton .

Thanks
Sarbjit
# 4  
Old 12-14-2009
change the SWITCHCHARS to be minus instead of /
Code:
set SWITCHCHARS=-


"(The slash, "/", may be used instead of a minus to introduce options. To pecify a different set of characters to introduce options, use the SWITCHCHARS environmental variable.)
Copyright (c) 1988-2009 by Hamilton Laboratories. All rights reserved."
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Change text color from echo command?

I have a bash script that starts and stops a game among other things through in.fifo and out.fifo In game the text comes out gray . Kinda hard to see in game window . I would like to change it to purple and maybe capitalize it. #!/bin/bash #nwservctl.sh cd... (5 Replies)
Discussion started by: 222222quick
5 Replies

2. HP-UX

Problem with starting

Dear all Once i try to change some configuration files for internet connections and after that i have problem to start the system. it get to at logo of HP UX and repeat the same starting procedure all the time. What can i do here? I am beginner at HP UX. (1 Reply)
Discussion started by: panoupanou
1 Replies

3. Shell Programming and Scripting

Problem with echo command

I am trying to get ascii file using echo command, e.g. - echo "\050" It is correctly working on RHEL 4 but not in RHEL 5. Please help me to fix the issue. ## Working as expected in RHEL 4 $ lsb_release -d Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 8) $ echo... (4 Replies)
Discussion started by: atanubanerji
4 Replies

4. UNIX for Dummies Questions & Answers

Sort text file starting at column X

Hello everyone! As the heading reads, I would like to sort the lines of a text file, starting at a specific column (i.e. skip the first X characters of each line). What I’m actually trying to sort is the md5 sums file of a directory. Every time I copy a new file to that directory, I perform... (3 Replies)
Discussion started by: iznogoud
3 Replies

5. Shell Programming and Scripting

problem with suppressed output to file using echo and tee command

Hi, When I run the following command in terminal it works. The string TEST is appended to a file silently. echo TEST | tee -a file.txt &>/dev/null However, when I paste this same line to a file, say shell1.sh, and use bourne shell . I run this file in terminal, ./shell1.sh. However I... (1 Reply)
Discussion started by: shahanali
1 Replies

6. Solaris

Session starting problem

When i start a CDE session on Solaris 9 it starts the Gnome desktop for like five minutes with nothing on the screen except the background then it enters the CDE environment and when I enter (new session) Gnome environment it takes 5 to 10 minutes then the session starts so I wounder why it... (8 Replies)
Discussion started by: darkman
8 Replies

7. Shell Programming and Scripting

Echo Variables and Text

I've been trying to get the syntax right so I can echo a $var and then text around it or after it. It either wont display text or $var or one overwrites the other at the beginning of the line. Trying to do something like this. var=1 echo $var"+1.1" #output expected 1+1.1 Its an older... (3 Replies)
Discussion started by: Grizzly
3 Replies

8. AIX

Service starting Problem

Dear All, When i am start the service netd i am facing the problem 0513-015 The inetd Subsystem could not be started Please check subsystem resources and try again later. please suggest me. It is urgent (1 Reply)
Discussion started by: pernasivam
1 Replies

9. UNIX for Dummies Questions & Answers

remove lines in text starting with . (period)

how can i remove lines from a text file starting with . (a period) (11 Replies)
Discussion started by: Movomito
11 Replies

10. Solaris

x server starting problem

i have installed solaris 10 on PIII i Ghz cpu, whole installation carried out in GUI mode but after installation it is unable to start GUI mode. Error is : "X server can not be started on display 0" screed flickers twice and the CLI login prompt appears (1 Reply)
Discussion started by: ajays
1 Replies
Login or Register to Ask a Question