Last active
August 29, 2015 14:01
-
-
Save andytlr/c192f7169e7323efddfb to your computer and use it in GitHub Desktop.
Revisions
-
andytlr revised this gist
May 21, 2014 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,15 +3,15 @@ while read line ; do let n=n+1 filename=`basename "$line"` dropboxuser=21267 # Replace with your ID directory=/shots/keep/ # This is the full path iside your Public Dropbox directory. The slashes are important. path=~/Dropbox/Public$directory mkdir -p $path date=$(date +%H-%M-%S)- if [ -f $path$filename ] ;then mv $line $path$date$filename printf https://dl.dropboxusercontent.com/u/$dropboxuser$directory$date$filename | pbcopy else mv $line $path$filename printf https://dl.dropboxusercontent.com/u/$dropboxuser$directory$filename | pbcopy fi done -
andytlr revised this gist
May 21, 2014 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,15 +2,16 @@ n=0 while read line ; do let n=n+1 filename=`basename "$line"` dropboxuser=21267 # Replace with your ID permanent_directory=/shots/keep/ # This is the full path iside your Public Dropbox directory. The slashes are important. permanent_path=~/Dropbox/Public$permanent_directory mkdir -p $permanent_path date=$(date +%M%H%S)- if [ -f $permanent_path$filename ] ;then mv $line $permanent_path$date$filename printf https://dl.dropboxusercontent.com/u/$dropboxuser$permanent_directory$date$filename | pbcopy else mv $line $permanent_path$filename printf https://dl.dropboxusercontent.com/u/$dropboxuser$permanent_directory$filename | pbcopy fi done -
andytlr revised this gist
May 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ n=0 while read line ; do let n=n+1 filename=`basename "$line"` permanent_directory=/shots/keep/ # This is the full path iside your Public Dropbox directory. permanent_path=~/Dropbox/Public$permanent_directory mkdir -p $permanent_path date=$(date +%M%H%S)- -
andytlr revised this gist
May 21, 2014 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,12 @@ while read line ; do permanent_directory=/shots/keep/ permanent_path=~/Dropbox/Public$permanent_directory mkdir -p $permanent_path date=$(date +%M%H%S)- if [ -f $permanent_path$filename ] ;then mv $line $permanent_path$date$filename printf https://dl.dropboxusercontent.com/u/21267$permanent_directory$date$filename | pbcopy else mv $line $permanent_path$filename printf https://dl.dropboxusercontent.com/u/21267$permanent_directory$filename | pbcopy fi done -
andytlr revised this gist
May 20, 2014 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,9 @@ n=0 while read line ; do let n=n+1 filename=`basename "$line"` permanent_directory=/shots/keep/ permanent_path=~/Dropbox/Public$permanent_directory mkdir -p $permanent_path mv $line $permanent_path printf https://dl.dropboxusercontent.com/u/21267$permanent_directory$filename | pbcopy done -
andytlr revised this gist
May 20, 2014 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,8 @@ n=0 while read line ; do let n=n+1 filename=`basename "$line"` mkdir -p ~/Dropbox/Public/shots/keep/ mv $line ~/Dropbox/Public/shots/keep/ printf https://dl.dropboxusercontent.com/u/21267/shots/keep/$filename | pbcopy done -
andytlr revised this gist
May 20, 2014 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,9 @@ n=0 while read line ; do let n=n+1 old_path='\/Users\/andytlr\/Dropbox\/Public\/Shots\/' filename=`echo $line | sed -e "s/$old_path//g"` mkdir -p ~/Dropbox/Public/shots/keep/ mv ~/Dropbox/Public/shots/$filename ~/Dropbox/Public/shots/keep/$filename printf https://dl.dropboxusercontent.com/u/21267/shots/keep/$filename | pbcopy done -
andytlr revised this gist
May 20, 2014 . 1 changed file with 6 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,10 @@ #!/bin/sh -u n=0 while read line ; do let n=n+1 old_path='\/Users\/andytlr\/Dropbox\/Public\/Shots\/' filename=`echo $line | sed -e "s/$old_path//g"` echo $filename mv ~/Dropbox/Public/shots/$filename ~/Dropbox/Public/shots/keep/$filename printf https://dl.dropboxusercontent.com/u/21267/Shots/keep/$filename | pbcopy done -
andytlr revised this gist
May 20, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,4 +6,6 @@ while read line ; do let n=n+1 echo $line | sed -e "s/$old_path/replace/g" done # this looks interesting http://teaching.idallen.com/dat2330/04f/notes/shell_read.txt -
andytlr created this gist
May 20, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #!/bin/sh -u n=0 while read line ; do old_path='\/Users\/andytlr\/Dropbox\/Public\/Shots' new_path='\/Users\/andytlr\/Dropbox\/Public\/Shots\/π' let n=n+1 echo $line | sed -e "s/$old_path/replace/g" done