RE: Solaris And Linux ?

RE: Solaris And Linux ?

 

  

Hi Stephen,

You can do global search and replace in vi!

When in vi, use the following searcha nd replace command:

:S,Es/this/that/g<CR>

The ':' (colon) is literal, use it to enter command mode.
Replace the 'S' with the line number you want to start the global search
and replace with.
Replace the 'E' with the line number you want to end the search and
replace with.
The 's' is literal and means "search".
The text 'this' is being found and replaced with 'that'.
The 'g' is literal and means find all occurrences on each line (global).

Oh, and if you just want to search and replace the whole file you use
'1' for 'S' and '$' (dollar sign) for the last line. The dollar sign is
an internal variable and is interpreted as the last line of the file.

If you would like to do your global search and replace
non-interactively, I would use sed, like this:

sed -e 's/this/that/g' < input_file > output_file

The input file is not modified. The output file will contain the
contents of input file with all occurrences of 'this' changed to 'that'.

Cool, huh?

kev


-----Original Message-----
From: Stephen Price
[mailto:oracledba-ezmlmshield-x13319675.[Email address protected]
Sent: Thursday, April 26, 2007 5:27 AM
To: LazyDBA Discussion
Subject: RE: Solaris And Linux ?

No GUI used from hosted sites. Connection drops too often when hammered
with "X" requests. The trick is to edit the dbt templates for DBCA and
"click like crazy" through DBCA to get the scripts generated, and then
edit and execute those in NOHUP mode.

How is our favorite tools namesake? I love vi, but need ex/ed to do
"GLOBAL SEARCH AND REPLACE".

Stephen Price
Oracle Database Administrator
Compusearch Software Systems, Inc.

-----Original Message-----
From: Edwards Ed
[mailto:oracledba-ezmlmshield-x85153324.[Email address protected]
Sent: Thursday, April 26, 2007 8:09 AM
To: LazyDBA Discussion
Subject: RE: Solaris And Linux ?

Well, well, well!
It's Stephen Price! Hehe. How have you been? And what GUI are you
using? You don't fool me! Hehe.





Please take a few minutes to provide feedback on the quality of service
you received from our staff. The Department of Education values your
feedback as a customer. Commissioner of Education Jeanine Blomberg is
committed to continuously assessing and improving the level and quality
of services provided to you.Simply use the link below. Thank you in
advance for completing the survey.


http://data.fldoe.org/cs/default.cfm?staff=Ed.[Email address protected]



---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html






Oracle LazyDBA home page