"Fossies" - the Fresh Open Source Software Archive

Member "buku-4.4/tests/genbm.sh" (15 Jun 2020, 543 Bytes) of package /linux/privat/buku-4.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "genbm.sh": 4.2.2_vs_4.3.

    1 #!/bin/bash
    2 
    3 # Scriptlet to auto-generate buku bookmarks
    4 # Usage: genbm.sh n
    5 #        where, n = number of records to generate
    6 #
    7 # Author: Arun Prakash Jana (engineerarun@gmail.com)
    8 
    9 if [ "$#" -ne 1 ]; then
   10     echo "usage: genbm n"
   11     exit 1
   12 fi
   13 
   14 count=0
   15 
   16 while [ $count -lt "$1" ]; do
   17     url=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)
   18     buku -a https://www.$url.com --title Dummy bookmark for testing. --tag auto-generated, dummy bookmark --comment Generated from the test script $count.
   19     let count=count+1
   20 done