Hi guys Help Me in Scripting
Hi all,
here i am attaching two input files as well as two output files,can you guys please give me the script for these files INPUT(1)- "23 Aug 2012 12:15:09 IST","Aug 23 12:13:45 AX2500 CAT-TDP-N: 192.168.10.2:6465400 <-->147.234.242.96:4435,147.234.242.96:4435 <-->182.19.88.230:6465400 OUTPUT(1)- 23 August 2012 12:13:45|AX2500|CAT-TDP-N|192.168.10.2|6465400|182.19.88.230|147.234.242.96|4435 INPUT(2)<134> Aug 23 12:13:46 AX2500 CAT-TDP-D: 192.168.10.2:569<-->8.8.8.8:533, 8.8.8.8:533<-->182.19.88.230:569 OUTPUT(2)- 134|23 Aug 2012 12:13:46|AX2500|CAT-TDP-D|192.168.10.2|8.8.8.8|533|182.19.88.230|569| |
Um... You mean you want a script to convert the input into the output? The two files don't have a common format, how do you expect a script to do the conversion?
|
Hi snark
Quote:
i.e script 1 and script 2 |
Ah I see. Well, you'll probably want to be looking at something like perl, ruby or python - you might just be able to do it with awk, but I don't think it'd be pretty.
|
Quote:
With only one example for each script, it's hard to see exactly what the rule should be. |
Quote:
Just by looking at what you posted, you can use sed to replace characters easily, so that could remove the "< >" characters, and replace the commas with "|" characters too. A simple compare in your shell script can look for "Aug" and output August instead, or you could also do that with sed as well, depending on how simple you want to keep things. |
All times are GMT -5. The time now is 07:29 AM. |