I wish to run the shell script on IBM AIX machine non-bash shell.
But you are demonstrating bash constructs, particularly the string redirection, <<<.
You also need to quote each element of the python array:
Do you really need to pass this python-style array into your script? Can you pass just a comma-delimited string?
Alternatively:
Assuming AIX has the printf utility.
Hi suppose in python I have a list(or array, or tuple, not sure the difference)
How do I loop inside the size of array.
The pseudo code is:
a=
for i = 1 to dim(a)
print a
end
How to find the dimension in python?
Also, anyone has a handbook to suggest so I can borrow from library (1 Reply)
Hi All,
I want to pass few dynamic arguments to shell script. The number of arguments differ each time I call the script.
I want to print the arguments using the for loop as below. But not working out.
for (( i=1; i<=$#; i++ ))
do
echo $"($i)"
done
/bin/sh test.sh arg1 arg2 arg3
... (1 Reply)
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)
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
How do i pass an array from test4.sh to a function in another shell script test5.sh, basically i am sourcing the test5.sh in test4.sh and printing the contents, but not working below are my trial scripts, please help, thank you.
#!/bin/bash
# /usr/local/dw/archive/test5.sh
print_array()
{... (5 Replies)
Hi All,
I need to get the version of python installed and store it in a variable for later use. Whereas it is printing on the console instead of storing to variable. I am able to store output of ls command in a variable. Please check the below code :
root@myhost:/volumes/srini# cat... (4 Replies)
I am working on requirement on spreadsheet in python scripting.
I have a spreadsheet containing cell values and with background color.
I am able to read the value value but unable to get the background color of that particular cell.
Actually my requirement is to read the cell value along... (1 Reply)
I'm trying to achieve the follwoinig with no luck.
Find the directories that are greater than 50GB in size and pick the owner of the directory as I would like to send an alert notification.
du -sh * | sort -rh
139G Dir_1
84G Dir_2
15G Dir_3
ls -l Dir_1
drwx------ 2... (3 Replies)
I am trying to loop through lots and lots of folders and use the names of the folders to run a Python script which has parameters.
E.g.
-- setup_refs -n John -f England/London/Hackney/John -c con/con.cnf
Normally to run `setup_refs` once from command line it's: `python setup_refs.py -n John... (3 Replies)
Discussion started by: Mr_Keystrokes
3 Replies
LEARN ABOUT DEBIAN
ipcheck
IPCHECK(8) System Administration Utilities IPCHECK(8)NAME
ipcheck - dyndns.org client
DESCRIPTION
Usage : ipcheck.py [options] Username Password Hostnames or ipcheck.py [options] --acctfile acct_info_file
Options: -a address manually specify the address
-r URL NAT router, use web IP detection
-A text
scan syslog for an IP after text (Unix only)
-F filename
guess the WAN IP from a firewall log
-b backup mx option ON (default OFF)
-c custom dns option (default dynamic)
-d dir directory for data files (default current)
-e script
execute script after a successful update
-f force update regardless of current state
-g NAT router, let dyndns guess your IP (do not use this in a cronjob, try -r)
-h print this help text
--help print all available help text
-i interface
interface for local address (default ppp0)
-j disable https
-l log debugging text to ipcheck.log file
--syslog
log debugging text to syslog (Unix only)
-m mxhost
mx host (default NOCHG)
-o set dyndns offline mode
-p proxy bypass on port 8245
-q quiet mode (unless there is an error)
-s static dns option (default dynamic)
-t test run, do not send the update
-v verbose mode
-w wildcard mode ON (default OFF)
--makedat
create the ipcheck.dat file by dns lookup
--devices
print router options (Linksys, Netgear, etc)
-n ip the router IP address on the internal lan
For help with different options: python ipcheck.py -h For supported devices listing : python ipcheck.py --devices For long detailed help
text : python ipcheck.py --help
Make sure you can write to the current directory for data files and that you always run from the same directory. The first time you run
the script, you will be asked to run with the --makedat option in addition to any other options. This will create the data files for the
hostnames and options your specify on the command line. You should only do this once. Subsequent runs should be made without the --make-
dat option.
For help with different options: python ipcheck.py -h For supported devices listing : python ipcheck.py --devices For long detailed help
text : python ipcheck.py --help
Example 1: the external IP is on eth0 of the current machine python ipcheck.py -l -i eth0 username password hostnames
Example 2: you are using the Linksys routing device python ipcheck.py -l -L linksyspassword username password hostnames
Example 3: you want to use web based ip detection python ipcheck.py -l -r checkip.dyndns.org:8245 ...
where ... is your dyndns username password and hostnames. Hostnames should be comma delimited if there are more than one.
Debian GNU/Linux January 2012 IPCHECK(8)