Skip to content

Instantly share code, notes, and snippets.

@MattMS
Last active July 21, 2017 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattMS/80ddc9baedc9e40a9d9b9b468b40934e to your computer and use it in GitHub Desktop.
Save MattMS/80ddc9baedc9e40a9d9b9b468b40934e to your computer and use it in GitHub Desktop.
Print file name (minus `.txt` extension), `=`, then file contents
#!/usr/bin/env fish
set ext '.txt'
for f in (ls | grep $ext)
echo (basename $f $ext)=(cat $f)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment