Ksh/perl banner - is there one :(-


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ksh/perl banner - is there one :(-
# 1  
Old 02-01-2013
Ksh/perl banner - is there one :(-

Hi,

Our Red Hat Linux machines, unlike Solaris, do not have the banner command. I am not the SA for these machines and the SA refuses to put in banner. Not sure what is his main objection to it, but he just flatly say no, end of story.

I am using banner as a quick way of identifying the progress run of the script.

Does anyone know of any ksh or Perl script that I can use in place of banner? If not, does anyone have a trick of maybe putting in a progress identifier on your scripts especially if it is a script that runs for awhile, you would want to know which part or sub of the script is it running on at some specific point in time.

Any advice will be much appreciated. Thanks in advance.
# 2  
Old 02-01-2013
Here is an interesting shell implementation of banner that works with KSH93 and BASH. I hope this will help.
# 3  
Old 02-02-2013
The sysadmin's objection is that banner is not part of the POSIX standard. He should explain that to you so get why. Rather than just 'no'.

Banner does not do anything really useful and from the UNIX getgo there were two totally different versions, so POSIX adopted neither one.

In a sense the admin is doing you a favor. Your code cannot port reliably with banner in it. You may not get why this is important until you've been in the IT world for a while. And have done system migration. Then when half of your scripts break because of banner, 'who am i' vs 'whoami', bdf vs df or non-POSIX versions of awk (the worst) you will get the message.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PERL to ksh

Hi, I have perl code inside my script. while (1) { * * * * *print "Enter 'n' for New , 'e' for Existing or 'q' to quit: "; * * * * *chomp($response = <STDIN>); * * * * *die "Exiting Process \n" if $response =~ /^q$/i; * * * * *last if $response =~ /^$/i; * * * * *print "Invalid... (3 Replies)
Discussion started by: talashil
3 Replies

2. Shell Programming and Scripting

Perl : Perl equivalent to the ksh | and ;

Ive been trying to move to Perl. It has been a struggle. My question is, is there a good resource that explains nesting statements. As an example. To change primary Factory CTS 1.9.0(46) P1 *Slot 1 CTS 1.10.2(42) P1 To primary *Slot 1 CTS 1.10.2(42) P1 ... (5 Replies)
Discussion started by: popeye
5 Replies

3. Shell Programming and Scripting

ksh: <a perl file name> not found

I am using a perl file to run a batc job from unix prompt. I am inside the correct directory where the perl file is located. I can even find the file using ls command. But when I run the perl file , it says 'ksh: <perl_file.pl> not found'. Could anyone please let me know what is wrong? (4 Replies)
Discussion started by: Subhasis
4 Replies

4. Shell Programming and Scripting

ksh vs perl strange interaction.

Hello everybody, I isolated an issue: please try the following script (under AIX) #!/usr/bin/ksh93 echo "Before Perl: \c" read line echo "|$line|" perl -e 'print "Perl invocation";' echo echo "After Perl: \c" read line echo "|$line|" On the first input, type Ctrl-D. It works... (13 Replies)
Discussion started by: jlovi
13 Replies

5. Shell Programming and Scripting

Using Perl Inside KSH

Hi there, I am new to Perl and KSH. The system I am using picks up the KSH scripts and uses them in a batch job control system. I am trying to set a variable from a perl command #!/bin/ksh -eaxp #******************************************************************************* # Testing... (5 Replies)
Discussion started by: SaadLive
5 Replies

6. Shell Programming and Scripting

Need to convert ksh script to Perl

Guys I am new to this forum, this may seem like a cheeky request. I have been asked by my manager to convert this ksh script to Perl. I do not have the foggiest about Perl and would appreciate any help on this. Basically this scipt automates a recovery process for EMC Legato Networker. It will... (1 Reply)
Discussion started by: rahimm1
1 Replies

7. Shell Programming and Scripting

Perl in KSH - julian conversion

Hello Everyone, I have this code misbehaving in one of my scripts, I have a var containing the sequential number of the day for the year and I am suppose to get the regular date for that day and its weekday. If I set the day to 273 I get back 2008/09/31 which is not a proper date. can you help... (7 Replies)
Discussion started by: gio001
7 Replies

8. Shell Programming and Scripting

Embedding Perl construct in ksh...

Hi, I have an embedded Perl construct in a korn script. However, I cannot seem to access the shell variables that were declared outside this Perl section. This is how my script is written....I have also tried back-ticks where I assign the shell variable to my local perl variable, still... (1 Reply)
Discussion started by: svetlur
1 Replies

9. Shell Programming and Scripting

accessing a function in ksh from perl

is it possible? Because I know we could use open(A, `abc.ksh`); to access a ksh, but is it possible to access just one (or more) function from the ksh script? (2 Replies)
Discussion started by: ahtat99
2 Replies

10. Shell Programming and Scripting

Invoke perl program from Ksh

Hi all, Can I invoke a perl script from Ksh script and pass parameters to the perl script. Please do help me.. thanks Maha (10 Replies)
Discussion started by: mahalakshmi
10 Replies
Login or Register to Ask a Question