05-03-2007
Quote:
SO I don't have to use "$" for FILE right?
If it's a variable, of course you do.
In the example, it is just a generic filename. You replace it with the name of your file. If you use a variable, quote it.
Last edited by cfajohnson; 05-03-2007 at 06:47 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I've got a SQL script that is executed through a UNIX ksh script. It is working fine, but I wanted to add a line to put a date/time stamp in the log file that it generates.
This is more of a SQL question, but I'm hoping someone can help me get the date/time...I've changed the script with the... (2 Replies)
Discussion started by: dstinsman
2 Replies
2. Shell Programming and Scripting
Hi,
I'm new to unix scripting.How can i call a script from another script.
I have a.ksh and b.ksh .I have to call b.ksh from a.ksh after it is successfully exceuted.
I tried using
#!/bin/ksh -x in a.ksh and at the end i have used /path/b.ksh
My problem is it is executing only a.ksh.it... (6 Replies)
Discussion started by: ammu
6 Replies
3. Shell Programming and Scripting
I am using awk in my .ksh script but when I am trying to run in windows
its not recognising awk part of the ksh script , even when I changed it to gawk it does not work, this is how my .ksh and .bat files look like.
thanx.
#!/bin/ksh
egrep -v "Rpt 038|PM$|Parameters:|Begin |Date: |End... (1 Reply)
Discussion started by: 2.5lt V8
1 Replies
4. Shell Programming and Scripting
I normally trace a script with the ksh -x <script name> and redirect strderr to file. But if you have a script like the examble below......
vi hairy
bear=`grep bear animals`
if
then
ksh more_animals
fi
If I ksh -x hairy it won't trace "more_animals" unless I put a -x in it. Is... (1 Reply)
Discussion started by: shorty
1 Replies
5. Shell Programming and Scripting
Ih all,
i have multiples ksh scripts for crontab's unix jobs
they all have same variables declarations and some similar functions
i would have a only single script file to declare my variables, like:
var1= "aaa"
var2= "bbb"
var3= "ccc"
...
function ab { ...}
function bc { ... }... (2 Replies)
Discussion started by: wolfhurt
2 Replies
6. Shell Programming and Scripting
How do i get the value of the variable from the called script(script2) to the calling script(script1) in ksh ?
I've given portion of the script here to explain the problem.
Portion of Script 1
=============
-----
-----
tmp=`a.ksh p1 p2 p3`
if then
# error processing
fi
-----... (10 Replies)
Discussion started by: rajarkumar
10 Replies
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
I am currently running 2 scripts to gather data for a 3rd script and would like to combine the 2 scripts into one. Having issues with the final output format.
Note cannot post URL so replaced the http stuff with (name) in the examples
All scripts contain #!/bin/ksh OS = Red Hat Enterprise... (0 Replies)
Discussion started by: pcpinkerton
0 Replies
9. Shell Programming and Scripting
Hi all,
I need to deploy two scripts on around ~100 machines and have only OPSware.
Opsware have the option to execute a script, so I am trying to write a script which dose
cat > script.ksh <<EOF
script to be deployed
EOF
However the script between the two EOFs gets also executed which... (0 Replies)
Discussion started by: click
0 Replies
10. Shell Programming and Scripting
Hi All,
I am novice to Unix and I need your expert advice for the below task.
There is a KSH script file in which I need to replace few line as per the below expectations. So my file look like as
# Host Setup Command:
Line 1
Line 2
Line 3
Line 4
Line Any... (6 Replies)
Discussion started by: rupid0609
6 Replies
LEARN ABOUT OSX
cgi::pretty
CGI::Pretty(3pm) Perl Programmers Reference Guide CGI::Pretty(3pm)
NAME
CGI::Pretty - module to produce nicely formatted HTML code
SYNOPSIS
use CGI::Pretty qw( :html3 );
# Print a table with a single data element
print table( TR( td( "foo" ) ) );
DESCRIPTION
CGI::Pretty is a module that derives from CGI. It's sole function is to allow users of CGI to output nicely formatted HTML code.
When using the CGI module, the following code:
print table( TR( td( "foo" ) ) );
produces the following output:
<TABLE><TR><TD>foo</TD></TR></TABLE>
If a user were to create a table consisting of many rows and many columns, the resultant HTML code would be quite difficult to read since
it has no carriage returns or indentation.
CGI::Pretty fixes this problem. What it does is add a carriage return and indentation to the HTML code so that one can easily read it.
print table( TR( td( "foo" ) ) );
now produces the following output:
<TABLE>
<TR>
<TD>foo</TD>
</TR>
</TABLE>
Recommendation for when to use CGI::Pretty
CGI::Pretty is far slower than using CGI.pm directly. A benchmark showed that it could be about 10 times slower. Adding newlines and spaces
may alter the rendered appearance of HTML. Also, the extra newlines and spaces also make the file size larger, making the files take longer
to download.
With all those considerations, it is recommended that CGI::Pretty be used primarily for debugging.
Tags that won't be formatted
The following tags are not formatted: <a>, <pre>, <code>, <script>, <textarea>, and <td>. If these tags were formatted, the user would see
the extra indentation on the web browser causing the page to look different than what would be expected. If you wish to add more tags to
the list of tags that are not to be touched, push them onto the @AS_IS array:
push @CGI::Pretty::AS_IS,qw(XMP);
Customizing the Indenting
If you wish to have your own personal style of indenting, you can change the $INDENT variable:
$CGI::Pretty::INDENT = " ";
would cause the indents to be two tabs.
Similarly, if you wish to have more space between lines, you may change the $LINEBREAK variable:
$CGI::Pretty::LINEBREAK = "
";
would create two carriage returns between lines.
If you decide you want to use the regular CGI indenting, you can easily do the following:
$CGI::Pretty::INDENT = $CGI::Pretty::LINEBREAK = "";
AUTHOR
Brian Paulsen <Brian@ThePaulsens.com>, with minor modifications by Lincoln Stein <lstein@cshl.org> for incorporation into the CGI.pm
distribution.
Copyright 1999, Brian Paulsen. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Bug reports and comments to Brian@ThePaulsens.com. You can also write to lstein@cshl.org, but this code looks pretty hairy to me and I'm
not sure I understand it!
SEE ALSO
CGI
perl v5.16.2 2012-10-11 CGI::Pretty(3pm)