I am new to TCL scripting and trying to run the script from terminal.
If i run the script like
tclsh myscript.tcl
then the script is executing without any issue.
But, if I run directly without "tclsh", then it is throwing error as follows,
./myscript.tcl
./myscript: Command not found.
I have given the execution permission for that file.
I have added the tclsh path in the PATH variable
echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/bin/tclsh
Can anyone help me on this ?
Try with adding:
#!/usr/bin/tclsh
In the beginning of your script.
If still doesn't work please show us your script you're trying to run, maybe there's something wrong.
Related
I use git bash on a windows 10 machine through Windows Terminal. The command 'env' works perfectly every time I start up a session in git bash. However, if I try to do any 'export' command, running any 'env' command after that will raise the error 'bash: env: command not found'. If I close my session and start another one, 'env' works perfectly again. Why is this happening?
I've tried all permutations of the 'env' command, but nothing works. The 'export' command always works, which I know because I tested it to see if it does indeed modify my PATH.
Note: I'm not sure what relevant system info would be helpful to include here, so please tell me what you'd need to solve this issue, but I'd prefer to include as little as possible for privacy.
I need your support in order to resolve the below issue. I highly appreciate it if could help here.
I have checked the related post, there was one similar issue but that is during installation. In my case, I have successfully installed the py.test, and I was using it was working as well. Post Jenkins installation I am facing the issue. I have passed the command line in the shell script and tried to execute the Job through Jenkins it is failed. To cross-check, I have verified in the command prompt it throws " py.test' is not recognized as an internal or external command, operable program or batch file". Can you please let me what all checks need to be done to rectify the issue?
Analysis from my end:
Checked in the system variables, there I can see python has been declared.
Regards,
Shiva
I have a work-around solution for that. If you uninstall jenkins from your PC and install&start jenkins from CMD with java -jar jenkins.war, it will resolve the problem. Now it can find and execute batch commands.
I know this must be easy,
i have the following:
ls | % { file.exe $_.fullname }
What i want to do is just run the file.exe command on all files in the current folder.
Here is my problem: in powershell ISE console everything works out. The results from the file.exe (console program) are shown in the results pane for all files in the folder.
When i run the command in my shell though nothing is shown. All the results are redirected dont know where.
After that, whatever command i type in the shell i get no output.
Help!
Try opening PowerShell using PowerShell -NoProfile. Executing this command will open the shell igonring you profile script. This could be because of some conflicting setting in you profile script, if any.
I have a shell script file in the rails application.Can anyone please tell me how can i call the shell script file with argument in my rails controller?
Thanks
Try backticks (``). For example a = `date` would assign shell's date command output to the a variable.
UPD: And you can obviously run something like `~/workspace/my_script.sh` to execute a script from a file, just make sure you give it executable permission first (with chmod +x ~/workspace/my_script.sh).
UPD2: And for the parameters, you can just interpolate them, like so `~/workspace/my_script.sh #{my_parameter_one}`. my_parameter_one will be available in the script as $1.
I'm just getting into ruby and am trying to execute a walkthrough from Sam Ruby's Agile web development.
I've created a directory using mkdir work
Next i'm instructed to open a terminal and type rubys> cd work
The error I'm getting reads:
No command 'rubys' found, did you mean:
Command 'ruby' from package 'ruby' (main)
rubys: command not found
Can anyone inform me of what I'm doing wrong?
I've also tried changing from ~ to the work directory before entering my command.
In this book, rubys> is a command prompt, much like you have C:\> in the Windows terminal.
Ignore that first bit and everything should start working.
I guess you're doing it wrong.
mkdir work
creates a directory called "work". It has nothing to do with Ruby.
cd work
will then change into that directory. Forget about the rubys>.