Fish Shell uses the test command to check file types and characteristics, including whether a target is a directory.
test
In Fish Shell, you can create a temporary file using mktemp.
mktemp
Here’s the Fish Shell scoop on opening those text files.
Let’s say greet.fish is your script.
greet.fish
To write to a text file in Fish, you can use the echo command combined with redirection operators.
echo
In Fish Shell, you can write to stderr by redirecting your output using >&2.
>&2