Skip to content

Instantly share code, notes, and snippets.

@kontza
Created September 25, 2020 11:50
Show Gist options
  • Save kontza/c76405f1b28d8e831d99d05a730186b3 to your computer and use it in GitHub Desktop.
Save kontza/c76405f1b28d8e831d99d05a730186b3 to your computer and use it in GitHub Desktop.
A sample Fish-script for processing a list file line by line and omitting lines starting with a '#'.
while read LINE
set -l LINE (string trim $LINE)
if string match -rqv '^#' $LINE
echo ">>> Processing line '$LINE'..."
end
end < list.file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment