IsraelTorres icon

extracturl.sh

IsraelTorres | PRO | 10/27/12 02:04:22 AM UTC | 0 ⭐ | 390 👁️ | Never ⏰ | []
Bash |

560 B

|

None

|

0 👍

/

0 👎

#!/bin/bash
:<<israeltorres_comment_block
 
 ./extracturl.sh
 Israel Torres
 -20121026
 -extracts url from .webloc file
 
Mac OS X 10.8.2 12C60 
Darwin Kernel Version 12.2.0
GNU bash, version 3.2.48(1)-release 
 
israeltorres_comment_block
 
#required app check
rqdapp='DeRez'
hash $rqdapp 2>&- || { echo >&2 "$rqdapp binary not found - aborting"; exit 1; }
#
 
if [ ! $# -ne 1 ]; then
    targetfile=$1
    DeRez -e -only 'url ' "$targetfile" | grep '\/\* .* \*\/' | sed 's/^.*\/\* //;s/ \*\/$//' | tr -d '\n'
else
    echo "usage: $0 'string'"
    echo "example: $0 string"
fi
#eof

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎