Is there a way to make this make itself executable?
I am not quite sure what you mean by "this": you show a script (without a specified name) producing another script (named "somescript.sh").
If you want the original noname-script to be executable, then put its text into a normal file (i.e. /some/where/script.sh) and issue this command:
This will make it executable for the owner (7) and the owners group (5), which most times makes sense. If you have special security considerations this might have to be changed.
If you just want the created script (somescript.sh) to be executable then add this to your script:
although i suggest that you use absolute pathes in scripts. This will create the script anywhere - and likely not where you expect it to be.
I'm trying to set up a form mail script on a website that when Submitted, a cgi script is executed and a perl translator (located in a secured and inaccessible folder) translates the script. After speaking to my hosting provider, I was told to "Telnet into the system and make the script... (2 Replies)
I have a script in my home direcroty which upon execution gives the essential system information like memory,cpu etc and is currently owned by root:root. Now I want to see that every non root user will run this file and grab the reqired system info. I know this is some thing associated with chown... (2 Replies)
hi,
i have a script that runs on bash and would like to run it on a machine that has csh and bash. the default setting on that machine is csh. i dont want to change my code to run it with a csh shell. is there any way i can run the script (written in bash) on this machine? in other words is there... (3 Replies)
as i said before i'm a beginner in shell programming and i have two questions:
how to run an executable file in shell scripts like for example let's say the file called "prog.exe", what's the shell command to run this file?
also how can i make the shell file an executable file (if it is... (5 Replies)
Hello everybody,
Is there any way to make a script (Bash, KornShell, etc.) executable
by mouse clicking?
For example you have a file myscript.sh, you run:
$ chmod u+x myscript.sh
Therefore it becomes executable and all you need is to run from
the terminal:
$./myscript.sh... (2 Replies)
Hello everybody,
I'm unable to make my shell script an executable file.
The details are as follows:
PATH includes my $HOME/bin i.e. /rchome/rc1/bin
HOME directory is /rchome/rc1
script name is prep_mig.sh permissions set are 755
It's executing if I give below command
sh prep_mig.sh
but... (4 Replies)
Hey guys, so I've been trying to write a bash script called runSorter.sh that runs an executable that also takes in some parameters and outputs the results to a text file. The executable, sorter, takes in a number parameter. I want to make it so that you can input as many number parameters into... (4 Replies)
Hi here's my code
${ORACLE_HOME}/bin/sqlplus /nolog <<!EOF
--step 5 create db script start
set feedback off
set heading off
set echo off
conn / as sysdba
spool ${ORACLE_SID}_db_link.sql
SELECT 'CREATE '||DECODE(U.NAME,'PUBLIC','public ')||'DATABASE LINK '||CHR(10)... (2 Replies)
I wish to create an executable bash script that will run the following commands as root, that is, using sudo su
iptables-save | awk '/^
/ { print $1 }
/^:+ / { print $1 " ACCEPT" ; }
/COMMIT/ { print $0; }' | iptables-restoreMy first attempt at bash... (9 Replies)