Hello,
I have huge number files in a directory. All files have the data. I want extract data. I want all output write to single csv file.
following codes works. Thank you very much for help.
sed -n '/.*Content$txtE_Zip" type="text" value="\([^<][^<]*\)" maxlength.*/s//\1/p' *>file1
sed -n '/.*Content$txtE_City" type="text" value="\([^<][^<]*\)" maxlength.*/s//\1/p' *>file2
sed -n '/.*Content$txtE_Address" type="text" value="\([^<][^<]*\)" maxlength.*/s//\1/p' *>file3
sed -n '/.*Content_lblPhone">\([^<][^<]*\)<\/span>.*/s//\1/p' *>file4
sed -n '/.*Content$txtE_State" type="text" value="\([^<][^<]*\)" maxlength.*/s//\1/p' *>file5
sed -n '/.*Content_lblBus">\([^<][^<]*\)<\/span>.*/s//\1/p' *>file6
I want single csv output. I want to make a sed operation.
output:
I have huge number files in a directory. All files have the data. I want extract data. I want all output write to single csv file.
following codes works. Thank you very much for help.
sed -n '/.*Content$txtE_Zip" type="text" value="\([^<][^<]*\)" maxlength.*/s//\1/p' *>file1
sed -n '/.*Content$txtE_City" type="text" value="\([^<][^<]*\)" maxlength.*/s//\1/p' *>file2
sed -n '/.*Content$txtE_Address" type="text" value="\([^<][^<]*\)" maxlength.*/s//\1/p' *>file3
sed -n '/.*Content_lblPhone">\([^<][^<]*\)<\/span>.*/s//\1/p' *>file4
sed -n '/.*Content$txtE_State" type="text" value="\([^<][^<]*\)" maxlength.*/s//\1/p' *>file5
sed -n '/.*Content_lblBus">\([^<][^<]*\)<\/span>.*/s//\1/p' *>file6
I want single csv output. I want to make a sed operation.
output:
Code:
"file6","file5","file3 file2, file5 file1, USA","file4"