arthur.bebou

Le site arthur.bebou.netlib.re - retour accueil

git clone git://bebou.netlib.re/arthur.bebou
Log | Files | Refs |

slug (325B)


      1 #! /bin/sh
      2 
      3 link=$(find public -type f -iname '*.html' |
      4 xargs grep -Er '(<title>|id=")' |
      5 	cut -b7- |
      6 	fzy)
      7 if $(echo "$link" | grep -q 'id='); then
      8 	echo "$link" |
      9 		sed -E 's,:.+id=",#,;s/index.html//' |
     10 		cut -d'"' -f1
     11 else $(echo "$link" | grep -q '<title>')
     12 	echo "$link" |
     13 		cut -d':' -f1 |
     14 		sed 's/index.html//'
     15 fi
     16