0
votes
2answers
68 views

Gnu parallel not utilizing all the CPU

I have a simple python script that read from stdin (a single line), do some processing (string parsing, no IO involved) and output to stdout e.g. python parse.py < in.txt > out.txt I have an ...
-1
votes
1answer
70 views

Python error when s3cmd is executed within bash script

I'm creating a bash script of which will run on a cron, it's purpose is to backup a directory to Amazon S3 using the s3cmd command. I get the following error when I run the script: /usr/bin/env: ...
1
vote
2answers
298 views

Capture Output of Python script in a bash script

I have a script that monitors game servers. It is written in bash. However I am attempting to put together an advanced monitor to pick up if the server has locked up. This requires a small python ...
1
vote
1answer
595 views

Linux RDesktop Lockups

I have a script I wrote to create RDP connections from Linux workstations to Windows servers. Everything is great when used on a machine plugged into an Ethernet jack but when used on a wireless ...
0
votes
1answer
107 views

split array element with special character

I would like to write a bash script (that would be better if the script is in python) which executes a Perl script ( https://github.com/MangeshBiradar/Check_mk/blob/master/check_jenkins_jobs.pl) ...
1
vote
2answers
77 views

Download with the bash or Python while keeping the directory tree/structure

I have a list of files that I need to download such as www.domain.com/files/archive.zip www.domain.com/img/icon.ico www.domain.com/files/backup/archive.zip www.domain.com/backup/img/icon.ico ...
-3
votes
1answer
341 views

Which scripting language to use to asynchronously ssh into equipment, run several commands, parse the output, and save to a file on my computer? [closed]

There are several points I'd like to stress in my question. I'd like to login by asynchronously ssh'ing into our infrastructure equipment. Meaning, I do not want to connect to only one device, do ...
0
votes
3answers
470 views

When to use Bash, when Python/Perl/Ruby? [closed]

What's your rationale for when to write a Bash script and when to use a more powerful scripting language (Python, Perl, Ruby, ...)? I'm finding that very simple scripts are nicer with Bash, but many ...
-1
votes
3answers
446 views

Should we abandon shell script (bash) and use Python as much as possible [closed]

The more I write Python, the more I hate the shell (bash) script e.g. if ["foo" = "foo"]; then echo "expression evaluated as true" fi Guess what is error? I need a space after [, that is so ...
1
vote
3answers
340 views

How to execute further commands in a Linux startup script after starting a process

I am trying to write a startup script that executes an application (MapProxy) after a server reboot. My server runs Ubuntu 11.04 Natty 64 bit. In the script, I execute a python script exec python ...
0
votes
2answers
288 views

Execute local (bash|python) script with mysql SQL

Basically I want to create a trigger so that when a field is updated it kicks off a local bash script (or python...whatever) to kick off a workflow (emails, work requests, etc). Is it possible to ...
1
vote
1answer
1k views

Running python script as a daemon in debian

I'm trying to run my python script as a service... But I'm getting this error when I call sudo update-rc.d mylistener start: Use of uninitialized value $ARGV[1] in pattern match (m//) at ...
1
vote
1answer
722 views

Reading stdin from python program started via ssh in terminal

I have got this little python3 script test.py: import sys print('test1') test1 = sys.stdin.read() print('test2') test2 = sys.stdin.read() print(test1) print(test2) And I would like to run this ...
0
votes
1answer
405 views

Python script take long time to backup folder

I copied this script from some book to make tar.bz2 of some folders for backup. #!/usr/bin/env python import tarfile, os def make_tar(folder_to_backup, dest_folder, compression='bz2'): if ...
0
votes
1answer
95 views

Whhich is best way to do linux tasks via shell commands or via python scripts

I want to build the web interface for executing or doing linux tasks . Although there may be some existing tools but i have build a complete system on the top of that so i need to program that system ...
4
votes
4answers
397 views

Confused with doing sys admin things with python or not

I was doing backups in bash and I have written few other bash scripts as well. I wanted to shift it to python because I needed to learn python for AI techniques and I was always delaying that. As I ...
0
votes
1answer
242 views

calling a different python interpreter from bash command line

I have python 2.7 installed [user@localhost google_appengine]$ python Python 2.7 (r27:82500, Sep 16 2010, 18:03:06) [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2 Type "help", "copyright", ...
1
vote
4answers
840 views

Run Python Server at Startup

I've got a few Python based servers that I need to run, and would like them to start automatically when I start my Ubuntu Server box. What is the best way to execute them like this? I was hoping I ...
0
votes
11answers
808 views

Check who is logged in on another machine without ssh?

Is there a way to find out who is logged in to another Linux machine on the network given the machine name and not just sshing into that machine and running who? I'd prefer a way directly in python, ...
0
votes
1answer
837 views

Redirect output of Python program to /dev/null

I have a Python executable, written and compiled by somebody else, that I simply need to run once halfway down my own bash script. The program uses a text-based UI, therefore waits for input before ...
0
votes
1answer
1k views

Delete files older than X days from remote FTP server

My backups are stored on remote FTP server. I'm looking for a universal way to clean-up the FTP directory using bash or python. Any help would be appreciated. Edited: I have only FTP access to the ...
0
votes
3answers
2k views

Mac OS X: Change $PATH from within python script

I have a bunch of python scripts. One of them installs software (subversion) that requires it's path to be added to $PATH. After it is installed, I want the next script to use the software. If I run ...