vimja

show one image from one subfolder per folder

Jan 11th, 2013
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.40 KB | None | 0 0
  1. #!/bin/bash
  2. ## Copyright (c) 2012 by Bash Vi
  3. ## This code is released under the terms
  4. ## of the WTFPL (What the Fuck Pulic License) version 2.0
  5. ## http://sam.zoy.org/wtfpl/
  6. for line in `ls`
  7. do
  8.   #echo "DEBUG $line";
  9.   FOLDER=`ls $line | head -1`
  10.   #echo "DEBUG $FOLDER";
  11.   IMAGE=`ls $line/$FOLDER/ | head -1`
  12.   #echo "DEBUG $IMAGE"
  13.   ls $line/$FOLDER/$IMAGE
  14.   gpicview $line/$FOLDER/$IMAGE
  15. done
Advertisement
Add Comment
Please, Sign In to add comment