I am trying a code in perl script and need to call another file in bash. Not sure, which is the best way to do that? can I directly call it using system() ? Please guide/ show me a sample way.
from what I have tried so far :
#!/usr/bin/perl
system("bash bashscript.sh");
Bash :
#!/bin/bash
echo "cdto codespace ..."
cd codetest
rm -rf cts
for sufix in a o exe ; do
echo ${sufix}
find . -depth -type f -name "*.${sufix}" -exec rm -f {} \;
done
I am getting an error when I execute the perl script : No such file or directory codetest
syntax error near unexpected token `do