Knowledge Base
  • Aviation
  • Commonplace
  • Computers
    • BASH Script to Convert List of Links to Bookmarks File
    • Exiftool usage
    • Format conversions using Pandoc
    • How to Adjust Screen Resolution when using VNC to Access a Raspberry Pi
    • How to Automatically Mount LUKS
    • How to Build Joplin for Linux ARM64
    • How to Create an Encrypted Container with LUKS
    • How to Disable Sleep and Suspend in BASH
    • How to Encrypt External Drives with LUKS
    • How to generate strong passwords
    • How to Install PowerShell on Linux
    • How to install SeaFile CLI on a Raspberry Pi
    • How to Install Turtl Server
    • How to Integrate Collabora Online with Nextcloud
    • How to Resolve dpkg Dependencies
    • How to Run a Command That’s Inside a Python Virtual Environment
    • How to Secure a Thumbdrive with Gocryptfs on Crostini
    • How to Set Hostname in BASH
    • How to Set Timezone in BASH
    • Software I Use
    • WPA supplicant.conf file for Headless Wi-Fi Setup
  • Genealogy
  • Getting Things Done
  • History
  • Radio
  • Recipes
  • Travelogue
Knowledge Base
  • »
  • Computers »
  • BASH Script to Convert List of Links to Bookmarks File
  • View page source

BASH Script to Convert List of Links to Bookmarks File

#!/usr/bin/env bash

echo "<!DOCTYPE NETSCAPE-Bookmark-file-1>"
echo '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">'
echo '<TITLE>Bookmarks</TITLE>'
echo '<H1>Bookmarks</H1>'
echo '<DL><p>'
cat $1 | while read L; do
  echo -n '    <DT><A HREF="';
  echo ''"$L"'">'"$L"'</A>';
done
echo "</DL><p>"
Previous Next

© Copyright 2021, John Mayson.

Built with Sphinx using a theme provided by Read the Docs.