Textual problem

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Textual problem
# 1  
Old 04-04-2002
Question Textual problem

I am a completely newby in this forum and a completely newby in Unix too. I have searched this question before I posted it to this forum, but forgive me if it was previously answered! Smilie

My question is simple. I have a Unix K-shell that receives an argument. But this argument is always between double quotes. For example I receive in $1 the value "127" (double quotes included).

How can I remove them inside my shell?

Thanks a lot!
# 2  
Old 04-04-2002
When I do myscript.sh "127" the shell removes the double-quotes and my script never sees them, so I don't know what your situation is. But I can force the double-quotes to be a part of the parameter by enclosing the double-quoted parameter inside single-quotes. Then I can remove them with eval myparm1=$1 .
# 3  
Old 04-04-2002

Originally posted by Jimbo
When I do myscript.sh "127" the shell removes the double-quotes and my script never sees them, so I don't know what your situation is.
My situation is that my script is executed by Oracle Applications Smilie In OA you can schedule executions of scripts, SQL Statements, etc... and you pass the arguments while the scheduling process.

All goes right when you pass arguments to a PL/SQL scheduled but, for Unix scripts, OA gives you all the arguments in one single argument between double quotes. So if you pretend to pass number 87 and 45, what you receive is string "87,45".

You helped me a lot! Thanks!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Router problem or ISP problem ?

Hi everyone, I am experiencing discontinuity of Internet service, this started 1 month ago. Everything worked very well for 1 year of intensive use, but now, I have problems reaching my gateway. The gateway is not my router but a node belonging to my ISP and I share the same public IP with... (3 Replies)
Discussion started by: remic
3 Replies

2. UNIX for Dummies Questions & Answers

sed Or Grep Problem OR Terminal Problem?

I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore. Here is what 's happening: * I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies

3. IP Networking

Problem with forwarding emails (SPF problem)

Hi, This is rather a question from a "user" than from a sys admin, but I think this forum is apropriate for the question. I have an adress with automatic email forwarding and for some senders (two hietherto), emails are bouncing. This has really created a lot of problems those two time so I... (0 Replies)
Discussion started by: carwe
0 Replies

4. Shell Programming and Scripting

Permission bit translator - octal to textual and vice versa

Hi, Does anyone know of any permission bit "translator"? One that can translate the permission bit from its textual value to its octal value and vice versa. It is alright if it is always just rwx but on a lot of occasions nowadays, getting a lots of s, S, t, etc. -rwxrwxrwx 1 oracle dba... (4 Replies)
Discussion started by: newbie_01
4 Replies

5. UNIX for Dummies Questions & Answers

DHCP problem and eth1 problem

At work I am trying to get this one Linux machine (let's call it ctesgm07) to behave like another Linux machine that we have (let's call it test007). test007 returns the following version info: cat /etc/debian_version: lenny/sid uname -a: Linux test007 2.6.27-7-generic #1 SMP Tue Nov 4... (0 Replies)
Discussion started by: sllinux
0 Replies

6. AIX

user login problem & Files listing problem.

1) when user login to the server the session got colosed. How will resolve? 2) While firing the command ls -l we are not able to see the any files in the director. but over all view the file system using the command df -g it is showing 91% used. what will be the problem? Thanks in advance. (1 Reply)
Discussion started by: pernasivam
1 Replies

7. Solaris

problem in finding a hardware problem

Hi I am right now facing a strange hardware problem. System get booted with the following error: Fatal Error Reset CPU 0000.0000.0000.0003 AFSR 0100.0000.0000.0000 SCE AFAR 0000.07c6.0000.1000 SC Alert: Host System has Reset It happen 4 or 5 times and get the same error every time.I... (8 Replies)
Discussion started by: girish.batra
8 Replies

8. Shell Programming and Scripting

problem with dd command or maybe AFS problem

Hi, folks. Sorry for bothering, but maybe someone could help me please. The problem is the following: there is some script that copies files from local file system to AFS. The copying is performed with dd command. The script copies data into some AFS volumes. The problem appeared with one... (0 Replies)
Discussion started by: Anta
0 Replies

9. UNIX for Advanced & Expert Users

SSH Problem auth problem

Hi, Just recently we seem to be getting the following error message relating to SSH when we run the UNIX script in background mode: warning: You have no controlling tty. Cannot read confirmation.^M warning: Authentication failed.^M Disconnected; key exchange or algorithm negotiation... (1 Reply)
Discussion started by: budrito
1 Replies

10. UNIX for Dummies Questions & Answers

Textual oddity

This is my first post!! I really hope this question hasn't been asked a thousand times before(I'll bet it has). Anyway, here it is. I am new to the UNIX world by the way so forgive my ignorance. OK, whenever I write code on my windows machine and then try to port it over to UNIX I always get... (3 Replies)
Discussion started by: Jubba
3 Replies
Login or Register to Ask a Question