Actually Not as i just provided sample data.
Best regular expression to look for is
Because the line feed is coming right after "My_first name" field and there are more fields after "My_other"
Hi
I have a file with lots of line feeds and form feeds (page break). Need to replace last occurrence of form feed (created by - echo "\f" ) in the file with line feed.
Please advise how can i achieve this.
TIA
Prvn (5 Replies)
I have a file with varying record length in it. I need to reformat this file so that each line will have a length of 100 characters (99 characters + the line feed).
AU * A01 EXPENSE 6990370000 CWF SUBC TRAVEL & MISC
MY * A02 RESALE 6990788000 Y... (3 Replies)
Hi! I have been struggling with a large file that has stray end of line characters.
I am working on a Mac (Lion). I mention this only because I have been mucking around with fixing my problem using sed, and I have learned far more than I wanted to know about Unix and Mac eol characters.
I... (1 Reply)
Hi Guys,
I am having a set of date format files files where I am performing the below set of operations in the files . I Need to replace the last line value with specific date which is a pipe delimited file.
for egf1_20140101.txt
aa|aus|20140101|yy
bb|nz|20140101|yy
.
.... (19 Replies)
Hi forum,
Can you please help me understand how to look for and replace the below pattern (containing line breaks) and return a new result?
Rules: Must match the 3 line pattern and return a 1 line result.
I have found solutions with sed, but it seems that sed installed in my system is... (5 Replies)
As per requirement if column 2 is NULL then 'N' ELSE 'Y'.
I have written below awk code. But it is not replacing values for first line. :confused:
cat temp.txt
1|abc|3
1||4
1|11|c
awk -F'|' '{if($2==""){$2="N"}else{$2="Y"} print $0 } {OFS="|"} ' < temp.txt
1 Y 3 ... (4 Replies)
Hi Forum.
I have the following script that splits a large fixed-width file into smaller multiple fixed-width files based on input segment type.
The main command in the script is:
awk -v search_col_pos=$search_col_pos -v search_str_len=$search_str_len -v segment_type="$segment_type"... (8 Replies)
Hello,
Can someone please share a Simple AWK command to append Carriage Return & Line Feed to the end of the file, If the Carriage Return & Line Feed does not exist !
Thanks (16 Replies)
Hi,
I'm trying to get a line returned as is from the below input.csv file in Bash in Linux, and somehow I get an unexpected newline in the middle of my input.
Here's a sample line in input.csv
$> more input.csv
TEST_SYSTEM,DUMMY@GMAIL.COM|JULIA H|BROWN
And here's a very basic while loop... (7 Replies)