Search Results

Search: Posts Made By: vlinet
1,735
Posted By vlinet
Thank you very much Franklin52. It works well.
Thank you very much Franklin52. It works well.
3,655
Posted By vlinet
This perl script worked very well. Thank you...
This perl script worked very well.

Thank you for all the script help.
Vimala
1,735
Posted By vlinet
block of name value pair to db insert statements
Hi,

I need to convert the following file into DB insert statements.



$ cat input.txt
START
name=john
id=123
date=12/1/09
END

START
name=sam
id=4234
status=resigned
date=12/1/08 ...
3,655
Posted By vlinet
The output I get is === This is a file...
The output I get is
===
This is a file containing employee info
START
name john
id 123
date 12/1/09
END
Total records 2
Date of extraction: 12-3-09
===

Whereas the expected output is...
3,655
Posted By vlinet
This worked. Thank you. # awk...
This worked. Thank you.

# awk 'BEGIN{RS=""}!/resigned/' file
However, it is missing the blank lines. Is there anyway to get the blank lines as well.

thanks,
Vimala
3,655
Posted By vlinet
Thank you for your help. awk '$0 !~...
Thank you for your help.

awk '$0 !~ /START/{print}
$0 ~ /START/
{while ($0 !~ /END/){s=s"\n"$0;getline}s=s"\nEND";
if(s ~ /resigned/){s="";next}else {print s;s=""}}' filename


It...
3,655
Posted By vlinet
process text between pattern and print other text
Hi All,


The file has the following.

=========start of file===
This is a file containing employee info

START
name john
id 123
date 12/1/09
END

START
name sam
id 4234
date ...
Showing results 1 to 7 of 7

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