Created
March 12, 2013 12:52
-
-
Save erhan-/5142637 to your computer and use it in GitHub Desktop.
A simple firefox to dwb bookmark converter. Has to be run in the same folder as bookmarks.html
This file contains 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
#!/bin/bash | |
#dwb ff bm conv | |
#this not completed | |
count=`grep -c icon bookmarks.html` | |
for (( i = 1; i < $count; i++));do | |
url=`cat bookmarks.html|grep icon | awk "FNR==$i" | awk '{gsub(/HREF="|"/,"") };{print $2}'` | |
name=`cat bookmarks.html | grep icon |awk "FNR==$i" | awk 'match($0,"\">"){print substr($0,RSTART+1)}' | cut -c 2-| rev | cut -c 5- | rev` | |
echo "$url $name" >> ~/.config/dwb/default/bookmarks | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment