monochromatic

monochromatic blog: http://blog.z3bra.org
git clone git://z3bra.org/monochromatic
Log | Files | Refs

commit 714c013b9bbe185258b91d3d9fe5624699cd4d89
parent 7f2589bdb6500984bbc4717aadf3d189685bdfc5
Author: z3bra <willyatmailoodotorg>
Date:   Sun, 16 Aug 2015 19:54:35 +0200

publi.sh: fixed wrong shell expansion WITH BASH

Diffstat:
publi.sh | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/publi.sh b/publi.sh @@ -1,6 +1,6 @@ #!/bin/sh -link=$(ls -l last.txt | sed 's^.*-> /') +link=$(ls -l last.txt | sed 's^.*-> /;s.txt$.html') test -z "$EDITOR" && EDITOR=vi @@ -10,7 +10,7 @@ next=$(printf "0x%04x" `echo "1 16i${last}+p"|dc`) # format our title and put it in a temp file title=$(sed '1s/^# /* '$next' - /;1p;d' < last.txt) -sed -i "s(#)(${link/.txt/.html})" tmp.txt +echo "$title" | sed "s(#)(${link})" > tmp.txt # present out the final index for reviewing cat index.txt >> tmp.txt