[TriLUG] Need some help parsing a file
John Vaughters
jvaughters04 at yahoo.com
Mon Dec 30 11:16:53 EST 2013
You got me Pete. Sorry for not being more thorough on the output requirement. I missed the space requirements in the file name.
Back to my original support for cut as easy to remember. The cut with a -c being the easiest to use and remember. Awk with a little more help as shown earlier being second. For those like you and William that are good with Regex, I solute you, because I just have not built that skill well enough to pick it as the easiest solution. I did learn quite a bit from this thread as well and I am sure that this old tired brain will forget most of it and stick with cut.
echo '11/09/2013 11:49 AM 7,887,098 this is filename 1.txt' | cut -c39-
Of course this assumes fixed chars. If that is not the case, I fully agree that that regex is the best solution that I would fall on.
Thanks for the informative discussion.
More information about the TriLUG
mailing list