I am trying to extract some information from a text file using SED.
Here is the sample input:
-rw-rw-r-- 1 1994 1994 47137269 May 9 15:47 filename05_18_2008.exe
I need to extract the number 47137269 from the file and write it to another. But that number could change. I need a script that will search for the second occurrence of 1994 and extract the info after it, in between the two spaces.
This is the output from an ftp site, to download a program update periodically.
What I want to end up doing is eventually compare file sizes to verify download completion.
Help is greatly appreciated as my knowledge of SED is very limited.
Start Free Trial