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

/bin/csh: Event not found. #146

Open
rlox199099 opened this issue Sep 6, 2022 · 1 comment
Open

/bin/csh: Event not found. #146

rlox199099 opened this issue Sep 6, 2022 · 1 comment

Comments

@rlox199099
Copy link

rlox199099 commented Sep 6, 2022

Hi neurobin,
I got some troubles:

cat test.csh
#!/bin/csh -f
set tmp='"apple"'
echo $tmp
set tmp='"banana"'
echo $tmp
./test.csh
"apple"
"banana"
sh -f test.csh
ls -a
. .. test.csh test.csh.x test.csh.x.c
./test.csh.x
/bin/csh: Event not found.
"apple"
"banana"

when I execute ./test.csh.x
it seem treat "!" as "history substitution"
however, according to shc man,
"The compiled binary will still be dependent on the shell specified in the first line of the shell code (i.e. #!/bin/sh), thus shc does not create completely independent binaries."

how can I fix it?

Appendix:

  • my csh info:

/bin/csh --version
tcsh 6.18.01 (Astron) 2012-02-14 (x86_64-unknown-linux) options wide,nls,dl,al,kan,sm,rh,color,filec

  • shc version: "shc Version 4.0.3, Generic Shell Script Compiler"

shc -h
shc Version 4.0.3, Generic Shell Script Compiler
shc GNU GPL Version 3 Md Jahidul Hamid jahidulhamid@yahoo.com
shc Usage: shc [-e date] [-m addr] [-i iopt] [-x cmnd] [-l lopt] [-o outfile] [-rvDSUHCABh] -f script

@weichanghe
Copy link

I have also encountered this issue in csh scripts.
because we have a lots of script by csh,
Could you help to fix this issue?
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