How to use scl enable python command call with in bash shell script?
I have a bash shell script, within it i am using the below two commands . its failing right on scl enable command itself.
if i run it by itself without a shell, it works fine.
by default it is using pythin version 2.6 something. i want to use 3.4 version for that reason with in the shell script using below python side calls.
need help please how to properly use the below two lines within bash shell script.
'
Thanks a lot for the help info.
Last edited by jim mcnamara; 01-23-2019 at 12:44 PM..
How do i tell my bash shell script to test the output of the command i'm using?? I want this script to look for lines not equal to 1 then let me know..
$ cat blah ; echo ---- ; cat blah.sh
1 fe
1 fi
1 fo
0 fum
1 blahda
1 blah
0 blahh
1 bla
1 bl
1 blahhh
----
#!/bin/bash
while... (1 Reply)
Hello,
Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?
Example:
>>> import subprocess
>>> help(subprocess)
...
...
I'm hoping so as I hate scrolling and love how less works with... (0 Replies)
Hi All,
Linux lxs3er06 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux
Issue:
While executing shell scripts in bash shell, following error messages are thrown:
rm:command not found
On doing little investigation, I added '/bin' to $PATH and on doing echo... (9 Replies)
In a bash script, one can call a perl command in the following manner, where "myperlcommand" is a perl command.
perl -e 'myperlcommand(arguments)'
perl -e 'print("UUUU"x4)'
Now, how can one call a bash command from within a perl script? (Suppose that mybashcommand is a bash... (1 Reply)
I'm pretty new to bash scripting and I've found myself writing things like this (and the same with even more nesting):
if $CATEGORIES; then
if $LABEL_SLOTS; then
$pyth "$wd/texify_grammar.py" "$input" "$texfile" "--label-slots" "--categories" "$CATEGORY_LIST"
... (9 Replies)
Hi all,
I need help figuring out why my script won't work when envoked from web interface. First off, I'm fairly new to Linux and Shell scripting so, my apologies for being ignorant!
So I have a python script that I envoke through a web interface. This script envokes my shell script and... (8 Replies)
Hi,
I am trying to run a python script embedded in bash script. But is throwing me an error. Please help.
Script:
#!/bin/bash
nohup /usr/bin/python /opt/web/http.py &
Error:
/usr/bin/python: can't open file '/opt/web/http.py': No such file or directory
Please help me on this. (6 Replies)
Hi Team,
I have to execute a task from my local machine, where i keep my .expect,.sh, .bash and .python scripts .Task are coded in the script and has to be executed at remote machine.
for that i used following task
.....
SCRIPT 1:
cat shell_check.sh
read value
if
then
expect... (3 Replies)
Hi everyone,
i have the following script.sh:
foo='lsusb | grep Webcam | cut -c16-18'
sudo /home/user/public/usbreset /dev/bus/usb/001/$foo
when i try to call this script from python using subprocess.call("script.sh", shell=True) it seems that only 'sudo /home/user/public/usbreset' is being... (6 Replies)
On our server default python version is 2.6, how to enable rh-python34 via bash shell.
Thanks a lot for the helpful info. (7 Replies)
Discussion started by: cplusplus1
7 Replies
LEARN ABOUT CENTOS
scl
scl(1) General Commands Manual scl(1)NAME
scl - Setup and run software from Software Collection environment
SYNOPSIS
scl <action> <collection1> [<collection2> ...] <command>
scl <action> <collection1> [<collection2> ...] -- <command>
scl {-l|--list} [<collection1> <collection2> ...]
DESCRIPTION
This manual page documents scl, a program which is an utility for running software packaged as a Software Collection.
scl utility allows to execute an application which is not located in the filesystem root hierarchy but is present in an alternative loca-
tion. This application can still use and benefit from software installed in the root filesystem. In order to let an application be visible
to the system one has to use scl utility as an interface.
<action> is a script name to execute in a bash environment before the application itself takes in executed. Currently only enable scriptlet
is mandatory which is needed to update search paths, etc.
One can enable more Software Collections if needed and therefore one can use multiple collections which are enabled by the left-right order
as present on scl command-line.
<command> is an arbitrary command or set of commands to execute within the Software Collection environment enabled. Control is returned
back to the caller with the original environment as soon as the command finishes. If <command> is '-' (dash) then it is read from the stan-
dard input.
Note: if you use <command> consisting of multiple arguments, you either need to use quotes or the -- command separator. Everything that
follows the separator will be considered a command or its argument.
Note: some commands modify user environment in some way. Those commands may potentially break SCLs, as their activation also usually
depends on env. modification as well. Typical examples of such commands are su and sudo. Every collection modifies the environment differ-
ently, thus more details may be found in the documentation of the particular collection.
OPTIONS -l, --list
Lists all installed Software Collections on the system.
-l, --list <collection1> <collection2> ...
If a collection name is specified then list of installed packages belonging to the collection is listed.
EXAMPLES
scl enable example 'less --version'
runs command 'less --version' in the environment with collection 'example' enabled
scl enable foo bar bash
runs bash instance with foo and bar Software Collections enabled
cat my_command | scl enable baz -
run set of commands listed in my_command file in the environment with baz Software Collection enabled
scl -l list all installed collections
scl -l example
list all packages within example collection
AUTHOR
scl was written by Jindrich Novy <jnovy@redhat.com> and Jan Zeleny <jzeleny@redhat.com>
scl(1)