Search Results

Search: Posts Made By: newbeee
1,267
Posted By newbeee
thank you
thank you
1,267
Posted By newbeee
The 1 is on the same line of C_ID but I want it...
The 1 is on the same line of C_ID but I want it to be a new line before C_ID


s/.*C_ID.*/\n1&/


but this doesn't seem to work? \n is a new line right?
1,267
Posted By newbeee
Add char before certain line
I'm trying to add a '1' before a line that has the word "C_ID"

s/.*C_ID.*/&\n1/
The above code did what I need, but the '1' is added after the C_ID word :( Help please.
3,392
Posted By newbeee
@ryan: Thank you very much! This works perfectly!...
@ryan: Thank you very much! This works perfectly! It's exactly what I'm looking for. Your post is very helpful. I do appreciate you went into details and gave me an explaination for it. Thanks once...
5,227
Posted By newbeee
no luck :( the whole original file is produced,...
no luck :( the whole original file is produced, no 1 is added. Ideally, this is what I'm looking for in the newfile.txt

Primary Ins.: MEDICARE B DMERC Secondary Ins.: CONTINENTAL LIFE...
5,227
Posted By newbeee
There is no '1' inserted into the next line. It...
There is no '1' inserted into the next line. It just rewrite the whole file as is. :(
3,392
Posted By newbeee
Append a string on the next line after a pattern string is found
Right now, my code is:
s/Secondary Ins./Secondary Ins.\
1/g

It's adding a 1 as soon as it finds Secondary Ins.
Primary Ins.: MEDICARE B DMERC Secondary Ins.
1: CONTINENTAL LIFE INS

What...
5,227
Posted By newbeee
Corona688: sed.exe can be found at...
Corona688:

sed.exe can be found at C:\Program Files (x86)\GnuWin32\bin
This is where I defined on SED_PATH and SED_PROGRAM is calling sed.exe. Is this wrong? If so, how should I define it?
...
5,227
Posted By newbeee
Insert a break page after certain string using SED
Hi:

I have 2 files: teststring.txt and a tempfile.txt

teststring file contains:
s/Primary Ins./\n1/g

I'm trying to search for "Primary Ins." string in tempfile. For every "Primary...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 04:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy