10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Greetings!
I set up a basic threading specimen which does the job:#!/usr/bin/python
import threading
class a(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
print("thread a finished")
class b(threading.Thread):
... (0 Replies)
Discussion started by: LinQ
0 Replies
2. Shell Programming and Scripting
Hi all.
I have a script like this
function check_filesize {
filesize_1="$(ls -la "$1"|awk '{ print $5 }')"
sleep 123
filesize_2="$(ls -la "$1"|awk '{ print $5 }')"
if
then
echo "OK"
else
echo "NOT OK"
sleep 1234
check_filesize $1
fi
}
function check_TR {
chk="$(tail -1 $1|grep... (5 Replies)
Discussion started by: aimy
5 Replies
3. Shell Programming and Scripting
Hi,
I have a problem with the spawn execution with expect.. i have done the code for expect in a separate file and i am calling the this execution from the bash script.. as given below..
-bash-4.1$ cat main.sh
#!/usr/bin/bash
./spawn.exp
==========================
-bash-4.1$ cat... (2 Replies)
Discussion started by: satishkumar432
2 Replies
4. Shell Programming and Scripting
Hi
I am trying to spawn an snmptrap from python but i keep getting the following error
Invalid version specified after -v flag: 2c -c public 192.168.2.162 SNMPv2-SMI::enterprises.3.1.1
here is the python code i am using
from subprocess import Popen
Popen()
When i test the same... (0 Replies)
Discussion started by: kaf3773
0 Replies
5. Shell Programming and Scripting
Hi Friends,
Iam invoking another shell script to create B2k_session_id from my shell script.It is properly creating B2k_session_id and after creation control is coming out from the script and going to command prompt.The lines which are after the exectrusteduser.com sh.com are not executing..may... (5 Replies)
Discussion started by: vadlamudy
5 Replies
6. Programming
I was wondering if Python's execution stack does not grow if we make recursive call of a function i.e. if we implement a fibonacci () and factorial () functions and made recursive call of them in a conditional statement the execution stack will not grow?
I wish someone answer this question with... (1 Reply)
Discussion started by: pharaoh
1 Replies
7. UNIX for Dummies Questions & Answers
Hello All,
Good day! This is my first UNIX post. :D
Anyways, I would like to seek help from you guys if you know of any UNIX command that will skip a warning message once it is encountered but continue to run the execution.
Ok here's the situation in general:
An encypted file is sent to... (2 Replies)
Discussion started by: jennah_rekka
2 Replies
8. Shell Programming and Scripting
Hi,
I am new this forum. I request you peoples help in understanding and finding some solution to my problem.
Here it goes:
I need to perform this set of actions by writing a shell script. I need to read a config file for the bunch of processes to execute.
I need to fecth the pid of... (4 Replies)
Discussion started by: sachin4sachi
4 Replies
9. Shell Programming and Scripting
Hello, I need advice on how to check if started processes are finished in perl, here's explanation :
OS is RHEL 4, perl -v = "This is perl, v5.8.0 built for i386-linux-thread-multi"
The logic of the script :
#!/usr/bin/perl
use warnings;
$param1 = $ARGV;
$param2 = $ARGV;
$param3 =... (2 Replies)
Discussion started by: sysgate
2 Replies
10. Shell Programming and Scripting
I want to be able to run a script on one server, that will spawn another shell which runs some commands on another server..
I have seen some code that may help - but I cant get it working as below:
spawn /usr/bin/ksh
send "telnet x <port_no>\r"
expect "Enter command: "
send "LOGIN:x:x;... (2 Replies)
Discussion started by: frustrated1
2 Replies