Created
July 4, 2013 22:41
-
-
Save hoolymama/5930650 to your computer and use it in GitHub Desktop.
process output from itstat (sony)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# "ls *.JPG | itstat" gives the following output: | |
# | |
# File: DSCN0159.JPG | |
# Resolution: 2560 x 1920 | |
# Channels: 10 | |
# Channel Types: RGB with Alpha | |
# Bit Depth: 8 | |
# | |
# File: DSCN0160.JPG | |
# Resolution: 2560 x 1920 | |
# Channels: 10 | |
# Channel Types: RGB with Alpha | |
# Bit Depth: 8 | |
# | |
# File: DSCN0161.JPG | |
# Resolution: 1920 x 2560 | |
# Channels: 10 | |
# Channel Types: RGB with Alpha | |
# Bit Depth: 8 | |
# | |
# We want a comand that will use itstat and list files that are a specific resolution like so: | |
# | |
# DSCN0159.JPG: 2560 x 1920 | |
# DSCN0160.JPG: 2560 x 1920 | |
# | |
# The command is: | |
res="2560 x 1920" && ls *.JPG | itstat.py | grep -B 1 "$res" | grep "File:" | sed "s/$/: $res/" | sed 's/File: //' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment