LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-01-2008, 01:02 AM   #1
shokeer
LQ Newbie
 
Registered: Oct 2008
Posts: 2

Rep: Reputation: 0
Copy line from file and write it to another file


Hi All,
Thank you for helping according to the last question and i want to ask another two quesion as the following:-

1- I have a tnsnames.ora contains this text (REP_SHOKEEROR12_ORAAPPR2. =)
and i want to search on this line & copy this line to another file called tnsnames.log.

2- I want to update table from shell script command.

Thanks,

Ahmed Shokeer
 
Old 11-01-2008, 04:47 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by shokeer View Post
i want to search on this line & copy this line to another file
You'll want Rute or some other generic "basic commands" tutorial to read: 'grep name_of_infile '(REP_SHOKEEROR12_ORAAPPR2. =)' >> name_of_outfile'.


Quote:
Originally Posted by shokeer View Post
I want to update table from shell script command.
So whats the actual and full command to "update table"?
 
Old 11-01-2008, 06:54 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I think you can also use SED to grab a line and write it to a file. You need to be clear whether you want to append the line to the file (as in the example above) or to replace the contents of the file with the new line.
Excellent SED tutorial here:
http://www.grymoire.com/Unix/Sed.html

Quote:
2- I want to update table from shell script command.
You will have to explain this one....What kind of table?...Update with what?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line gnome file copy stefan_nicolau Linux - Software 2 05-30-2008 09:55 AM
in search of copy-on-write file system exponential Linux - General 1 08-17-2007 10:35 AM
how copy a file from a cd into the computer using the comand line? mariav Linux - Software 3 04-13-2007 10:07 PM
Write long file name in a line shadkong Linux - General 2 04-09-2005 08:52 PM
command line CDR / copy file rioguia Linux - Newbie 4 10-05-2002 04:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration