22 lines
552 B
Bash
Executable File
22 lines
552 B
Bash
Executable File
#!/bin/bash
|
|
# script: winlink
|
|
# version: 0.2
|
|
# author: Alex Osborn(alex_osborn0@hotmail.com)
|
|
# date: 10 Jan 2010
|
|
# tested: Ubuntu 9.10 (amd64)
|
|
# description: Opens windows .url files in firefox, feel free to edit and use as needed just dont steal the credits!
|
|
#
|
|
TMP="/tmp/${0##*/}$$"
|
|
cat "$@"|grep -s URL|grep -ivs eurl > $TMP
|
|
LINE=1
|
|
MAX=`cat $TMP|wc -l`
|
|
while [ "$LINE" -le "$MAX" ];do
|
|
LINK=`head -q "$TMP" -n $LINE|tail -qn 1|tail -qc +5`
|
|
if [ -n "$LINK" ];then
|
|
firefox -new-tab "$LINK"
|
|
echo "$LINK"
|
|
fi
|
|
LINE=$((LINE+1))
|
|
done
|
|
rm $TMP
|