Home » Infrastructure » Unix » Script (Redhat 5)
Script [message #508525] Sun, 22 May 2011 23:54 Go to next message
muktha_22
Messages: 527
Registered: December 2009
Senior Member
Hi All,

Kindly help me on the below query..

I have written the below script:

--------------------------------------------
echo "Enter the filename:"
read filename
echo -e "Enter the pattern Name: \c"
read pattern
grep $pattern $filename
--------------------------------------------

But when I change the order of the specification in the last line.
eg:- grep $filename $pattern

It is giving error,

Kindly any one tell me the reason....

Regards
Muktha
Re: Script [message #508526 is a reply to message #508525] Mon, 23 May 2011 00:02 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
(I don't speak Unix (any more))

Which error is it?

An obvious solution would be - don't change order of those two parameters.

Besides, how is this question related to Oracle?
Re: Script [message #508540 is a reply to message #508525] Mon, 23 May 2011 01:12 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
This question bears no real connection with Oracle.
Please find a more appropriate forum.
The topic is locked.
If I'm wrong, please, PM me (or report this message to a moderator, explain why you think it should be unlocked and it might be done).

Regards
Michel
Previous Topic: Root user
Next Topic: Topas command in unix
Goto Forum:
  


Current Time: Sat Nov 23 05:54:22 CST 2024