I have a shell script executes tree command
$ cat _tree.sh
#!/bin/sh
tree -L 2 --charset ascii -I "_tree.sh|LICENSE|README.md|node_modules|nbproject"
$ sh _tree.sh
.
|-- bower.json
|-- dpl
|-- dst
|-- gulpfile.js
|-- package.json
`-- src
|-- fonts
|-- images
|-- scripts
`-- styles
7 directories, 3 files
$
When I execute the command directly,
$ tree -L 2 --charset ascii -I "_tree.sh|LICENSE|README.md|node_modules|nbproject"
.
|-- bower.json
|-- dpl/
|-- dst/
|-- gulpfile.js
|-- package.json
`-- src/
|-- fonts/
|-- images/
|-- scripts/
`-- styles/
7 directories, 3 files
$
The forwarding slashes(/) are appended. How can I make the _tree.sh file do this?
tree -Fin your interactive shell?~/.profileand found exactly the same alias!