I am trying to execute three tasks in one bash script.
The coding I did is :
#!/bin/bash
(cd TRAJ_OctylGlcTryp_C1/
&&
cpptraj zOctylgluTryC1.prmtop << EOF
trajin reImaged-OctylgluTryC1.nc 1 70000 500
trajout reImaged-OctylgluTryC1-500.nc netcdf
EOF
&&
cd ../)
Which means, first go into directory TRAJ_OctylGlcTryp_C1 and select few frames of simulation data and finally come out of the folder.
But I get error like this
./run_Select500Frames.sh: line 4: syntax error near unexpected token `&&'
./run_Select500Frames.sh: line 4: `&& '
Is there any way to get rid of this error? Thanks.