Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # Extract the original filename of renamed .R3D file. This is useful for reconstructing
- # R3D files restored from a data-recovery operation from an HFS+ drive.
- #
- # note: the “-m 1” argument tells grep to stop after the first returned match.
- # The pipe to "cut” is a dumb way to trim the leading “V” character on the returned filename
- 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