LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Remove time stamps from text file (https://www.linuxquestions.org/questions/linux-general-1/remove-time-stamps-from-text-file-899044/)

Ashex 08-23-2011 07:11 PM

Remove time stamps from text file
 
Hey Guys,

I just recently restored a system that had gone down to another server and we're checking that all the content has been moved over (we've gotten some reports of issues).

I've generated a a hefty list of all the files with a CRC checksum to compare against, however I've run in to a problem where the list contains the mtime of each file, and it's different on the destination so it's throwing off the diffs I'm running and I'm getting a lot of false positives.

I'm curious if anyone can tell me how to pull a timestamp out, rather just the first two columns out (however there are lines that start with a #) here's a sample of what I'm working with:

Code:

#  Archive data\10\Administering.zip
2008-04-08 15:44        22769          2675  69ce6018  imsmd_rootv1p2p1.xsd
2009-04-19 23:10          1511          551  591f3a83  index_lms.html
2009-04-19 23:10        10255          3407  c23eed6f  player.html


LBM 08-23-2011 09:16 PM

This maybe ?
Will give you the last to colums only.

<input> |awk '{print $5,$6}'

Maybe this is what you want, which skips lines starting with #.
<input> |awk '{if($1 !="#"){print $5,$6}}'


All times are GMT -5. The time now is 09:48 AM.