Skip to content

Instantly share code, notes, and snippets.

@erhan-
Created March 12, 2013 12:52
Show Gist options
  • Save erhan-/5142637 to your computer and use it in GitHub Desktop.
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
#!/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