10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
Below is an excerpt from a 20000+ lines and I want to do a search and replace of a specific string but I don't know how and I can't figure out how to. Can't find an example from Google or anywhere to do what I am wanting to do.
A 2018-11-21 08:42:17 TEST_TEST 2018-11-21... (9 Replies)
Discussion started by: newbie_01
9 Replies
2. Shell Programming and Scripting
Hello, everyone. Thanks for taking the time to read my post.
I have nagios config files for which I'm adding the custom variable _mac_address. I have a sed script that places this variable into an existing file. The problem I'm having is if a line in the file is commented out, I don't want the... (2 Replies)
Discussion started by: JimBass
2 Replies
3. Shell Programming and Scripting
I have file which contains data in the following format all in a single line:
BDW_PUBLN_ID DECIMAL(18:0) NOT NULL PRIMARY INDEX ARGO_ACCT_DEP_PI ( OFC_ID ,CSHBX_ID ,TRXN_SEQ_NUM ,PROCG_DT ) PARTITION BY RANGE_N(PROCG_DT BETWEEN DATE '2012-03-01' AND DATE '2014-12-31' EACH INTERVAL '1' MONTH );... (4 Replies)
Discussion started by: ysvsr1
4 Replies
4. Shell Programming and Scripting
Hi
Input:
-
--
---
----
aa-bb-cc
aa--bb--cc
aa---bb---cc
aa----bb----cc
Output:
.
-
-.
--
aa.bb.cc (7 Replies)
Discussion started by: chitech
7 Replies
5. Emergency UNIX and Linux Support
Hi,
I need to run a search and replace on a large database,
what I need to change is all instances of
#### (eg. 1764 or 1964)
to
(####) (eg. (1764) or (1964))
But there might be other numbers in there such as
(1764) and I do not need those changed to ((1764))
How can I... (7 Replies)
Discussion started by: lawstudent
7 Replies
6. Shell Programming and Scripting
Hello
I need to search for a mult-line strngs(with spaces in between and qoted) in a file1 and replace that text with Fixed string globally in file1. The strng to search for is in file2.
The file is big with some 20K records. so speed and effciency is required
file1: (where srch & rplc... (0 Replies)
Discussion started by: Hiano
0 Replies
7. Shell Programming and Scripting
There appears to be several threads that touch on what I'm trying to do, but nothing quite generic enough.
What I need to do is search through many (poorly coded) HTML files and make changes. The catch is that my search string may be on one line or may be on several lines.
For example there... (5 Replies)
Discussion started by: bisbell
5 Replies
8. Shell Programming and Scripting
sed novice bashing away at this....
I am trying to build a sed script that will find the instances of "cn" that have more than one "DirXML" value on them.... see sample below:
I am not having any luck with any variation that tries to find "DirXML.*\nDirXML.*". Isn't there a way to get sed to... (6 Replies)
Discussion started by: gosleddog
6 Replies
9. Shell Programming and Scripting
hello mighty all
there's a file with lots of comments.. some of them looks like:
=comment
blabla
blablabla
bla
=cut
i'm trying to cut this out completely with this code:
$line=~s/^=.+?=cut//sg;
but no luck
also tryed to change it abit but still I don't understand how the... (9 Replies)
Discussion started by: tip78
9 Replies
10. Shell Programming and Scripting
Hello
I need to search for a mult-line text in a file exfile1 and replace that text with another text. The text to search for is in exfile2 and the replacement text is in exfile3.
I work with kornshell under AIX and need to do this with a lot of files. (the file type is postscript and they need... (10 Replies)
Discussion started by: marz
10 Replies