09-06-2011
test2.sh.x is an executable file, not shell script anymore. You cannot source (.) it like you cannot source /bin/cat or something else. You can use stdin/stdout to get information from your source shell script or some other techniques like tempfile, named pipes, sockets, etc.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Has anyone ever gotten shc compiler program to work. I am trying to encrypt
a bash script on centos. When I run the command "shc -f test.sh", the binary actually gets created; however, when I try to run the binary I get the following the error:
# ./test.sh.x
./test.sh.x: No such file or... (1 Reply)
Discussion started by: cstovall
1 Replies
2. Programming
I have written a shell script called square, which prints the square of the input number, eg.
> square 4
16
There is a program called shc which compiles the shell scirpt and create a executable file and a c library file, namely square.x and square.x.c repectively.
If I would like to... (1 Reply)
Discussion started by: alfredo
1 Replies
3. Shell Programming and Scripting
Hello there,
I’m compiling a shell script under UNIX AIX 5.3 operating system.
I’m facing a “glitch” when I tried to run the .x file AIX sent the error message “Killed”.
# rpm -qa
libgcc-4.2.0-3
libstdc++-4.2.0-3
gcc-4.2.0-3
libstdc++-devel-4.2.0-3
gcc-c++-4.2.0-3
# make
*** ... (2 Replies)
Discussion started by: micrinho
2 Replies
4. Shell Programming and Scripting
Hi all!
First of all, sorry for my poor english :-S
Well, I have some scripts in a SuSe server to encrypt... but all them must still working when I encrypt it, ok?
About the server, I have root access:
# id
uid=0(root) gid=0(root) groups=0(root)
# uname -a
Linux servername... (4 Replies)
Discussion started by: Magius
4 Replies
5. Shell Programming and Scripting
Hi all,
I'm trying to install shc on my clean solaris 10 so that I could do some encrypting on my shell scripts.
I've tried several ways but it gave me these error messages
# make
cc -Wall -O6 shc.c -o shc
cc: illegal option -Wall
*** Error code 1
make: Fatal error: Command failed... (6 Replies)
Discussion started by: solarisnoob
6 Replies
6. Shell Programming and Scripting
I am using the shc shell compiler, it works fine, just that when i execute it, it displays the code at the terminal. Is there any way to hide this as well? otherwise it beats the purpose of hiding the code.
Thanks ! (7 Replies)
Discussion started by: ysvsr1
7 Replies
7. Shell Programming and Scripting
Hello, I have some shellscripts internal company more by the need to conceal the code to protect passwords and others, we are using the SHC.
the shellscripts always worked without error, including cron.
after the SHC, if I run manually (. / shellscript) it works
if I put the same command... (3 Replies)
Discussion started by: c0i0t3
3 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I would like to use shc on SUN 5.10 SPARC and HP UX Itanium 11.31 so that I could do some encrypting on my shell scripts.
But on these machines I don"t have cc or gcc.
I find a man who can download shc.c and send me the binary files.
You can download it here :
www datsi fi upm es... (3 Replies)
Discussion started by: peg
3 Replies
9. Red Hat
I have used shc utillity to convert a shell script to it's compiled version.Inside this script i have called another shell script which is also in compled version.
Example:-
Main script:- main.sh.x
child script:- child.sh.x (this is called inside main.sh.x)
This child script will run in... (2 Replies)
Discussion started by: millan
2 Replies
10. Shell Programming and Scripting
Hi All,
I am trying to create an executable using shc. I have a script which is creating 10 executables. The executables being created have the below issue.
The message "Please contact your provider" is displayed even though I am not using the “-e” option.
This message is coming for some... (5 Replies)
Discussion started by: temp_user
5 Replies
LEARN ABOUT CENTOS
cgexec
CGEXEC(1) libcgroup Manual CGEXEC(1)
NAME
cgexec - run the task in given control groups
SYNOPSIS
cgexec [-h] [-g <controllers>:<path>] [--sticky] command [arguments]
DESCRIPTION
The cgexec program executes the task command with arguments arguments in the given control groups.
-g <controllers>:<path>
defines the control groups in which the task will be run. controllers is a list of controllers and path is the relative path to
control groups in the given controllers list.
This flag can be used multiple times to define multiple pairs of lists of controllers and relative paths. Instead of the list of
all mounted controllers, the wildcard b"*b" can be used.
If this option is not used, cgexec will automatically place the task in the right cgroup based on /etc/cgrules.conf.
If /etc/cgrules.conf configuration file is used, there can be used template names. Then the control group name contains a template
in destination tag (see cgrules.conf (5)) and if the cgroup does not exist in execution time, it is created, based on /etc/cgcon-
fig.conf specification. If the specifications are not present the group is created with the default kernel values.
-h, --help
Display this help and exit.
--sticky
If running the task command with this option, the daemon of service cgred (cgrulesengd process) does not change both the task of the
command and the child tasks. Without this option, the daemon does not change the task of the command but it changes the child tasks
to the right cgroup based on /etc/cgrules.conf automatically.
EXAMPLES
cgexec -g *:test1 ls
runs command ls in control group test1 in all mounted controllers.
cgexec -g cpu,memory:test1 ls -l
runs command ls -l in control group test1 in controllers cpu and memory.
cgexec -g cpu,memory:test1 -g swap:test2 ls -l
runs command ls -l in control group test1 in controllers cpu and memory and control group test2 in controller swap.
ENVIRONMENT VARIABLES
CGROUP_LOGLEVEL
controls verbosity of the tool. Allowed values are DEBUG, INFO, WARNING or ERROR.
FILES
/etc/cgrules.conf
default libcgroup configuration file
SEE ALSO
cgrules.conf (5)
Linux 2009-03-15 CGEXEC(1)