Created
March 21, 2018 10:20
-
-
Save Nek/8c1d9055ac234a7bae3329e546b9de9f to your computer and use it in GitHub Desktop.
Bash to Fish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setting variables | |
bash: var=value | |
fish: set var value | |
function arguments | |
bash: "$@" | |
fish: $argv | |
function local variables | |
bash: local var | |
fish: set -l var | |
conditionals I | |
bash: [[ ... ]] and [ ... ] | |
fish: test ... | |
conditionals II | |
bash: if cond; then cmds; fi | |
fish: if cond; cmds; end | |
conditionals III | |
bash: cmd1 && cmd2 | |
fish: cmd1; and cmd2 | |
command substitution | |
bash: output=$(pipeline) | |
fish: set output (pipeline) | |
process substitution | |
bash: join <(sort file1) <(sort file2) | |
fish: join (sort file1 | psub) (sort file2 | psub) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment