I was using & in cshell in the end of a command, in order to execute the command as an independent process from the terminal:
kate filename.txt&
How I should do this in bash?
The same way. From bash(1)
:
If a command is terminated by the control operator &, the shell exe- cutes the command in the background in a subshell. The shell does not wait for the command to finish, and the return status is 0.
Using & will background the job, but it is still tied to the shell.
The difference you may find between csh and bash with & is with regard to redirecting STDERR.
In csh:
kate filename.txt >& kateout.log
In bash:
kate filename.txt > kateout.log 2>&1
If you want the process to survive the parent shell/terminal closing, try "nohup" i.e.:
nohup kate filename.txt > kateout.log 2>&1
The redirect is optional; if there is output it will go to nohup.out in the current working directory.