diff --git a/.local/bin/compiler b/.local/bin/compiler index 39e149e..faf37c9 100755 --- a/.local/bin/compiler +++ b/.local/bin/compiler @@ -53,5 +53,5 @@ case "$ext" in scad) openscad -o "$base".stl "$file" ;; sent) setsid -f sent "$file" 2>/dev/null ;; tex) textype "$file" ;; - *) head -n1 "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;; + *) sed -n '/^#!/s/^#!//p; q' "$file" | xargs -r -I % "$file" ;; esac diff --git a/.local/bin/queueandnotify b/.local/bin/queueandnotify index a54b13e..54b2c2a 100755 --- a/.local/bin/queueandnotify +++ b/.local/bin/queueandnotify @@ -7,7 +7,7 @@ queuefile="${XDG_DATA_HOME:-$HOME/.local/share}/newsboat/queue" while read -r line; do [ -z "$line" ] && continue - url="$(echo "$line" | awk '{print $1}')" + url="${line%%[ ]*}" qndl "$url" "curl -LO" done < "$queuefile"