lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] Saving bookmars during one session - Questions about usi


From: Thorsten Glaser
Subject: Re: [Lynx-dev] Saving bookmars during one session - Questions about using multiple bookmarks sessions
Date: Tue, 12 Jan 2021 22:20:33 +0000 (UTC)

mit-o@post.cz dixit:

>about how to create a simple script in order to cut/paste the links into
>secondary bookmarks file. I am not quite sure how to use this script in
>order to get the faster result than by simply copying and pasting links
>directly into bookmark file. Perhaps if I want to fill the bookmark file
>with many links ASAP from different sources?

You could use this to move the last bookmarked thing quickly.

For example, assuming your main bookmark file is ~/lynx_bookmarks.html
and your other files are ~/lynx_bookmarks_*.html, then you could do:


#!/bin/sh
if test -z "$1"; then
        echo >&2 "E: call me with the target bookmark file as argument"
        exit 1
fi
src=~/lynx_bookmarks.html
tgt=~/lynx_bookmarks_${1}.html
tail -n 1 <"$src" >>"$tgt"
ed -s "$src" <<\EOF
$d
w
q
EOF


If you run this as 'scriptname foo' it will take the last bookmark
you saved to the main file, append it to ~/lynx_bookmarks_foo.html
as well as delete it from the ~/lynx_bookmarks.html file.

bye,
//mirabilos
-- 
[00:02] <Vutral> gecko: benutzt du emacs ?
[00:03] <gecko> nö          [00:03] <gecko> nur n normalen mac
[00:04] <Vutral> argl       [00:04] <Vutral> ne den editor
        -- Vutral und gecko2 in #deutsch (NB: Editor? Betriebssystem.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]