Guest User

Untitled

a guest
May 23rd, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # Extract the original filename of renamed .R3D file. This is useful for reconstructing
  4. # R3D files restored from a data-recovery operation from an HFS+ drive.
  5. #
  6. # note: the “-m 1” argument tells grep to stop after the first returned match.
  7. # The pipe to "cut” is a dumb way to trim the leading “V” character on the returned filename
  8.  
  9. strings "FILE.R3D" | grep -m 1 -E "^.*[A-Z][0-9]{3}_[A-Z][0-9]{3}_[0-9]{4}[A-Z0-9]{2}_[0-9]{3}.R3D" | cut -c2-
Add Comment
Please, Sign In to add comment