I have create a .sh script, with option to open terminal and that same terminal run 2 commands. I know to open a new window or tab and run a command but when I put && I receive error like this by using this command:
Commands:
gnome-terminal --tab -- "ls && clear"
Error:
There was an error creating the child process for this terminal
Failed to execute child process “ls && clear” (No such file or directory)
My OS is Linux(Ubuntu)
ls && clearwhich only runscleariflsfails. How couldlsfail? Why clear the screen of your results as soon as you generate them?