SOLVED How to run a bash script

Status
Not open for further replies.

pernils

Explorer
Joined
Aug 31, 2015
Messages
87
I have been writing a bash script on my Ubuntu mate and when I try to run it on Freenas I get a lot of errors.
The default shell in freenas seems to csh. So for getting a bash shell I read that you just write
Code:
exec bash


But my script still have errors. Does bash differs between BSD and Linux ? How should I do if I want to run a bash script in cron ?

I also read that the shell we can access from web gui is default in bash.
https://forums.freenas.org/index.php?threads/replacing-standard-shell-with-bash-for-root.21321/

In my case it's problem with this non existing -xtype flag in find on Freenas.

it's just painfull ....
 
Last edited:

pernils

Explorer
Joined
Aug 31, 2015
Messages
87

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Yes, shebang.

Most unix flavours differ in the tools.
 
Status
Not open for further replies.
Top