Hi:
I am currently working on a program which requires direct its ouput to a file here is an example
./proram arg_1 arg_2
when program ends all output will be arg_2 file
Is that possible I am not a bad programmer, However I am stuck there.
Can anyone give a hint?
Thanks
SW (1 Reply)
Ahhhrrrggg I'm having a brain fart...
I want to take the output of a command and redirect it to a file...
This works....
$ man cp | cat >> copy_help
but this doesn't
keytool -help |cat >> keytool_help
It just produces... these lines...
more keytool_help
] ...
... (11 Replies)
Hi all!!
is possible to assign the output of some command to filename, i.e.
grep_output.txt
Otherwise, I want to open a new file which name is inside another, how can I do it?
Thanks a lot! (7 Replies)
If I want to cat one file and have the output inserted into a specific place on another file, how is this done? I know how to append >> and to overwrite > but say I have a file with:
File1:
abc
def
ghi
jkl
And a File with:
File2:
mno
pqr
stu
vwx
And I want to place the... (5 Replies)
Hi guys,
i have a script named purgeErrors.ksh, when i execute this script i need to redirect the output to a log file in the same directory, how can i do that ??
-- Aditya (5 Replies)
Hi All,
I want to redirect only the file names to a new file from the ls -ltr directroy. how Can i do it.
my ls -ltr output will be as below.
-rwxr-xr-x 1 118 103 28295 Jul 26 2006 event.podl
-rwxr-xr-x 1 118 103 28295 Jul 26 2006 xyz.podl
I want my new file... (6 Replies)
Hi,
I want to know how to redirect the output of topas -P to a file in a readable format. I tried doing it by using
topas -P > topas.txt but the output is not properly aligned and when I opened it using vi it ahd some characters.
Please help me out in this.
Thanks (1 Reply)
Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions.
... (4 Replies)
Hi Guys,
I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts.
I used below but it is not working:
OFILE=/home/home1/report1
echo "report1 details" > $OFILE
=/home/home1/1.sh > $OFILE
echo... (7 Replies)
I created a script to do some work. I want to use "echo" to redirect "date" to log file. echo works to screen. But cannot redirect first or second "echo" output to logfile. Please help. My code looks like:
STARTTIME=`date +%m-%d-%Y`
LOGFILE=/directory/logfile.log
echo "Start time:" $STARTTIME... (8 Replies)
Discussion started by: duke0001
8 Replies
LEARN ABOUT DEBIAN
jython
JYTHON(1) General Commands Manual JYTHON(1)NAME
jython - Python seamlessly integrated with Java
SYNOPSIS
jython [ -i ] [ -S ] [ -v ] [ -Dproperty=value ... ] [ -Wargument ]
[ -Ecodec ] [ -Qargument ]
[ -jar jar | -c cmd | file | - ] [ script-args ]
jython [ --help | --version ]
DESCRIPTION
Jython is an implementation of the high-level, dynamic, object-oriented language Python seamlessly integrated with the Java platform. The
predecessor to Jython, JPython, is certified as 100% Pure Java.
Jython is complementary to Java and is especially suited for the following tasks:
Embedded scripting:
Java programmers can add the Jython libraries to their system to allow end users to write simple or complicated scripts that add
functionality to the application.
Interactive experimentation:
Jython provides an interactive interpreter that can be used to interact with Java packages or with running Java applications. This
allows programmers to experiment with and debug any Java system using Jython.
Rapid application development:
Python programs are typically 2-10X shorter than the equivalent Java program. This translates directly to increased programmer pro-
ductivity. The seamless interaction between Python and Java allows developers to freely mix the two languages both during develop-
ment and in shipping products.
To make a jython script executable on your system you can add the following line to the top of the file:
#!/usr/bin/env jython
You will also need to add execute permissions to the script using chmod(1). Note that #!/usr/bin/jython will not work; you must use
#!/usr/bin/env jython. This is because /usr/bin/jython is a script itself, not a compiled binary.
OPTIONS
A summary of options is included below.
-i Continue running Jython interactively after running the given script, and force prompts even if standard input doesn't appear to be
a terminal.
-S Don't imply import site on initialisation.
-v Trace import statements on error output.
-Dproperty=value
Set the Jython property property to value; see jython.conf(5) for details of available properties.
-Wargument
Warning control. The full form of argument is action:message:category:module:line. Trailing empty fields may be omitted. Multiple
-W options may be given. See documentation of the warnings module for details.
-Ecodec
Set the encoding used to read module source files from disk.
-Qargument
Division control. See PEP 239 for details. Valid arguments are old, new, warn and warnall.
-jar jar
The program to run is read from the file __run__.py in the specified jar archive.
-c cmd The program to run is passed as the cmd string. This option terminates the options list.
file The program to run is the script file.
- The program to run is read from standard input (default behaviour). Interactive mode is used if running on a tty. This flag allows
you to pipe a file into Jython and have it be treated correctly.
script-args
Command-line arguments to pass to the Jython script in sys.argv[1:].
--help Print a usage message and exit.
--version
Print the Jython version number and exit.
ENVIRONMENT VARIABLES
JAVA (default: /usr/bin/java)
The Java interpreter to use when running Jython.
JAVA_OPTIONS (default: empty)
Options to pass to the Java interpreter when running Jython.
SEE ALSO jythonc(1), jython.conf(5).
If the Debian package jython-doc is installed, full documentation from the Jython authors will be available in /usr/share/doc/jython-
doc/html/.
AUTHOR
This manual page was prepared by Ben Burton <bab@debian.org> for the Debian GNU/Linux system (but may be used by others). It is based upon
the official Jython documentation.
July 7, 2001 JYTHON(1)