Sponsored Content
Top Forums Shell Programming and Scripting How to run multiple .py in ksh? Post 302842319 by sas on Thursday 8th of August 2013 11:03:49 PM
Old 08-09-2013
I don't know what my problem is, but I tried all three above and no dice?

New to shells, but I basically have 4 files (1.py, 2.py, 3.py,
4.py). I created a new file foo in vi, typed all three types of code above and the go to the unix prompt and type foo [enter] no dice. Pyton foo, still no dice???

A normal .py has the following and works fine???

Code:
#!/usr/bin/python
...

Am I executing this wrong?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Why can't I run a *.ksh file?

Hi I'm interested to know why is it that I can't run a specific *.ksh file, is it due to permission settings? If it is, how can I work around that? I'm not logging on as the administrator, do I need to be an administrator to run *.ksh files? (5 Replies)
Discussion started by: handynas
5 Replies

2. UNIX for Dummies Questions & Answers

Run ksh script from cgi

Hi, I'm developing a system which requires me to run a ksh script from within a cgi script. What sort of syntax will I need to do this, I'm sure it's simple but can't find out how anywhere! Thanks. (2 Replies)
Discussion started by: hodges
2 Replies

3. Shell Programming and Scripting

ksh to run servers

I want to write a Kshell program which will start the servers(Oracle,DataIntegrator). Can anybody help me with this? I would appreciate your help. Thanks in advance (0 Replies)
Discussion started by: pari111222
0 Replies

4. Shell Programming and Scripting

how to run ksh from csh

I'm comfortable with csh. However, i need to run a ksh script.Using exec /bin/ksh -i , I'm able to invoke ksh, but the script is not running any further. Variable QDDTS is an env setting on my csh env. The ksh script goes like this - #!/bin/csh exec /usr/local/bin/ksh -i function... (3 Replies)
Discussion started by: m_shamik
3 Replies

5. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

6. Shell Programming and Scripting

Bash Scipting (New); Run multiple greps > multiple files

Hi everyone, I'm new to the forums, as you can probably tell... I'm also pretty new to scripting and writing any type of code. I needed to know exactly how I can grep for multiple strings, in files located in one directory, but I need each string to output to a separate file. So I'd... (19 Replies)
Discussion started by: LDHB2012
19 Replies

7. Shell Programming and Scripting

Run script in a backgroun - ksh

i ran the below in ksh... nohup <script> & it is runnign in background. now how do i see if the above command is success... i also need to bring the command to foreground and view the run details. pls advise how to do that... (1 Reply)
Discussion started by: billpeter3010
1 Replies

8. Shell Programming and Scripting

How to run multiple Queries in a ksh Script?

How to run multiple Queries in a ksh Script I have a KSH script that has one SQL Query and generates and emails output of the query in HTML format. I want to change the script so that it has three SQL queries and the last query generates and emails the HTML output page of just that query. So far... (5 Replies)
Discussion started by: JolietJake
5 Replies

9. Shell Programming and Scripting

Ksh: run commands from pipe

I create commands within a pipe and finally want them to be executed instead of being displayed on the screen. What is the last stage in this pipe? I found by guessing that "ksh" is working, but is this the best to use here? It boils down to this: echo "print Hello World!"| kshWhat is the... (15 Replies)
Discussion started by: Cochise
15 Replies

10. Shell Programming and Scripting

Ssh to multiple hosts and then run multiple for loops under remote session

Hello, I am trying to login to multiple servers and i have to run multiple loops to gather some details..Could you please help me out. I am specifically facing issues while running for loops. I have to run multiple for loops in else condition. but the below code is giving errors in for... (2 Replies)
Discussion started by: mohit_vardhani
2 Replies
Method::Alias(3pm)					User Contributed Perl Documentation					Method::Alias(3pm)

NAME
Method::Alias - Create method aliases (and do it safely) SYNOPSIS
# My method sub foo { ... } # Alias the method use Method::Alias 'bar' => 'foo', 'baz' => 'foo'; DESCRIPTION
For a very long time, whenever I wanted to have a method alias (provide an alternate name for a method) I would simple do a GLOB alias. That is, # My method sub foo { ... } # Alias the method *bar = *foo; While this works fine for functions, it does not work for methods. If your class has a subclass that redefines "foo", any call to "bar" will result in the overloaded method being ignored and the wrong "foo" method being called. These are basically bugs waiting to happen, and having completed a number of very large APIs with lots of depth myself, I've been bitten several times. In this situation, the canonical and fasest way to handle an alias looks something like this. # My method sub foo { ... } # Alias the method sub bar { shift->foo(@_) } Note that this adds an extra entry to the caller array, but this isn't really all that important unless you are paranoid about these things. The alternative would be to try to find the method using UNIVERSAL::can, and then goto it. I might add this later if someone really wants it, but until then the basic method will suffice. That doing this right is even worthy of a module is debatable, but I would rather have something that looks like a method alias definition, than have to document additional methods all the time. Using Method::Alias Method::Alias is designed to be used as a pragma, to which you provide a set of pairs of method names. Only very minimal checking is done, if you wish to create infinite loops or what have you, you are more than welcome to shoot yourself in the foot. # Add a single method alias use Method::Alias 'foo' => 'bar'; # Add several method aliases use Method::Alias 'a' => 'b', 'c' => 'd', 'e' => 'f'; And for now, that's all there is to it. METHODS
import from => to, ... Although primarily used as a pragma, you may call import directly if you wish. Taking a set of pairs of normal strings, the import method creates a number of methods in the caller's package to call the real method. Returns true, or dies on error. SUPPORT
Bugs should always be submitted via the CPAN bug tracker <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Method-Alias> For other issues, contact the maintainer AUTHORS
Adam Kennedy <cpan@ali.as> SEE ALSO
<http://ali.as/> COPYRIGHT
Copyright 2004, 2006 Adam Kennedy. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.8.8 2006-07-15 Method::Alias(3pm)
All times are GMT -4. The time now is 12:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy