Skip to main content
1 of 2
Hauke Laging
  • 94.6k
  • 21
  • 132
  • 185

I am not familiar with xsel so I have no idea what causes your problem.

But independent of that in general you should not run more external commands than necessary so the simple solution to your problem is:

#!/bin/bash

xsel="$(xsel)"

firefox 'https://en.wiktionary.org/wiki/'"${xsel}"'#French'
echo "${xsel}$(date +": %Y-%m-%d (%a)")" >> fr/word-list.txt
Hauke Laging
  • 94.6k
  • 21
  • 132
  • 185