Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with bash scripts #69

Closed
mMontu opened this issue Dec 17, 2015 · 2 comments
Closed

Problem with bash scripts #69

mMontu opened this issue Dec 17, 2015 · 2 comments

Comments

@mMontu
Copy link
Contributor

mMontu commented Dec 17, 2015

The following script runs OK directly from the shell:

#!/bin/bash

echo $$
ps ax | grep sh

source_dir=(/data/abc \
            /data/cde \
            /net/fgh)


for i in ${source_dir[*]}; do
    echo "Entering directory $i/.."
done

But it fails with :SCCompileRun:

temp.sh: 10: /home/mmontu/temp.sh: Syntax error: "(" unexpected

From the output before the error message it can be seen that it is being run with the following line:

13361 pts/16   S+     0:00 /bin/bash -c (sh  /home/mmontu/temp.sh; echo $? >/tmp/vESldod/386) 2>&1| tee /tmp/vESldod/387

Thus the problem is that despite the shebang indicates bash, the script is being run by sh. But it is unclear why this plugin needs to run the script in a separate shell.

@xuhdev xuhdev closed this as completed in 8224fc3 Dec 18, 2015
@xuhdev
Copy link
Owner

xuhdev commented Dec 18, 2015

It should now be fixed. Please report back if you have further questions.

@mMontu
Copy link
Contributor Author

mMontu commented Dec 18, 2015

It works like a charm. Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants