escaping * in korn Shell under Sun Solaris


 
Thread Tools Search this Thread
Operating Systems Solaris escaping * in korn Shell under Sun Solaris
# 1  
Old 07-12-2005
escaping * in korn Shell under Sun Solaris

When trying to escape special character * - it doesn't seem to work. In korn shell trying to store a local variable as follows
sample=test*
echo $sample - gets all the file names starting with test* , instead i want to literally store the value test* into a variable. I tried escaping with \, with single quotes, with double quotes - nothing helped. I am in Sun Solaris OS
Please provide suggestions
Greatly appreciate it.
Thanks
# 2  
Old 07-12-2005
Please make sure you read the rules first.
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.

Thread closed.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Escaping problem in a shell script

Hi, i made a gnuplot script which accepts a filename as parameter (using gnuplot -e) now i want to run this script from a shell script, the correct command (with a concrete parameter) looks like this: gnuplot -e 'name="filename.dat;col=2"' gplscript.gpl my shell script looks like this: ... (4 Replies)
Discussion started by: franko007
4 Replies

2. Shell Programming and Scripting

escaping metacharacters in paths for a shell command

I have a file which contains a list of paths separated by a new line character. e.g /some/path/to/a/file.png /some/path to/another/file.jpeg /some path/to yet/another/file Notice that these paths may contain metacharacters, the spaces for example are also not escaped. If I wanted... (5 Replies)
Discussion started by: cue
5 Replies

3. Shell Programming and Scripting

Unix Korn Shell script on Solaris to DB2 UDB LUW database

I am rather new to korn shell scripting and attempting to write a Unix script that would detach, attach a range partition table in DB2 UDB LUW database. This would be a job scheduled in control M that reads in an input file with 5 parameters passed to it from the application. I don't have much... (1 Reply)
Discussion started by: tjhanso
1 Replies

4. Shell Programming and Scripting

Solaris Korn Shell Scripting

I have made the following simple script: a=0 let a=$a+1 if "] then mailx -s "Up" abc@yahoo.com fi When I run the above script, I get the following error: # ./new.ksh ./new.ksh: ]: not found. Please tell me how to use if here? (6 Replies)
Discussion started by: kamaldeep1986
6 Replies

5. Solaris

Sun Fire 280R Sun Solaris CRT/Monitor requirements

I am new to Sun. I brought Sun Fire 280R to practice UNIX. What are the requirements for the monitor/CRT? Will it burn out old non-Sun CRTs? Does it need LCD monitor? Thanks. (3 Replies)
Discussion started by: bramptonmt
3 Replies

6. Shell Programming and Scripting

2 shell scripts in Sun Solaris

Hi, Can somebody pls help me? I need to write 2 shell scripts in Sun Solaris operating system which would do this: 1. go to the specified directory - I am using alias for it at the moment 2. start the particular sql script with the output log as same as the script but with timestamp e. g.... (4 Replies)
Discussion started by: balco
4 Replies

7. Shell Programming and Scripting

How to write shell script in sun solaris ?

Hi , I am New to unix shell scripting. So can anybody help me. How to write shell script in sun solaris ? How to run/execute the script ? please post in details. (1 Reply)
Discussion started by: deb.simply
1 Replies

8. Solaris

password less login from openssh to SSH Secure Shell 3.0.1 Sun solaris 7

Hi, I would like to login from a Sun server running ssh: Sun_SSH_1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090704f to ssh: SSH Secure Shell 3.0.1 on sparc-sun-solaris2.6 How can I achieve this? Thanks a million in advance (1 Reply)
Discussion started by: newbewie
1 Replies

9. Shell Programming and Scripting

Escaping apostrophe using shell script

Hi, I am using the KSH shell. I am facing a problem of escaping apostrophe('), that is occuring in a variable. I used the following command, but in vain item=`echo $item|sed 's/'/\'/g'` this code replaces the occurance of ' in an xml file to apostrophe(') symbol. The output of... (2 Replies)
Discussion started by: mradul_kaushik
2 Replies

10. Shell Programming and Scripting

escaping * in korn shell

When trying to escape special character * - it doesn't seem to work. In korn shell trying to store a local variable as follows sample=test* echo $sample - gets all the file names starting with test* , instead i want to literally store the value test* into a variable. I tried escaping with \, with... (3 Replies)
Discussion started by: prekida
3 Replies
Login or Register to Ask a Question