[Solved] Banner not found ,need equivalent comand in Linux


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting [Solved] Banner not found ,need equivalent comand in Linux
# 1  
Old 07-03-2013
[Solved] Banner not found ,need equivalent comand in Linux

Hi guys,

I need to create a large text,In Unix i used banner command.But when i use banner in linux i am getting command not found error.
My Os version is
Code:
 
Linux

Please help me what is the equvalent command for banner to achieve.
I cant able to install banner in Linux because of admin permission rights.
But i need to get the banner like output in LINUX.
Please help me guys Smilie

Last edited by mohanalakshmi; 07-17-2013 at 09:22 AM..
# 2  
Old 07-03-2013
try below code.. save it in script called banner and enjoy Smilie

Code:
 
 #!/bin/ksh93
# or #!/bin/bash

A=$((1<<0))
B=$((1<<1))
C=$((1<<2))
D=$((1<<3))
E=$((1<<4))
F=$((1<<5))
G=$((1<<6))
H=$((1<<7))

function outLine
{
  typeset r=0 scan
  for scan
  do
    typeset l=${#scan}
    typeset line=0
    for ((p=0; p<l; p++))
    do
      line="$((line+${scan:$p:1}))"
    done
    for ((column=0; column<8; column++))
      do
        [[ $((line & (1<<column))) == 0 ]] && n=" " || n="#"
        raw[r]="${raw[r]}$n"
      done
      r=$((r+1))
    done
}

function outChar
{
    case "$1" in
    (" ") outLine "" "" "" "" "" "" "" "" ;;
    ("0") outLine "BCDEF" "AFG" "AEG" "ADG" "ACG" "ABG" "BCDEF" "" ;;
    ("1") outLine "F" "EF" "F" "F" "F" "F" "F" "" ;;
    ("2") outLine "BCDEF" "AG" "G" "CDEF" "B" "A" "ABCDEFG" "" ;;
    ("3") outLine "BCDEF" "AG" "G" "CDEF" "G" "AG" "BCDEF" "" ;;
    ("4") outLine "AF" "AF" "AF" "BCDEFG" "F" "F" "F" "" ;;
    ("5") outLine "ABCDEFG" "A" "A" "ABCDEF" "G" "AG" "BCDEF" "" ;;
    ("6") outLine "BCDEF" "A" "A" "BCDEF" "AG" "AG" "BCDEF" "" ;;
    ("7") outLine "BCDEFG" "G" "F" "E" "D" "C" "B" "" ;;
    ("8") outLine "BCDEF" "AG" "AG" "BCDEF" "AG" "AG" "BCDEF" "" ;;
    ("9") outLine "BCDEF" "AG" "AG" "BCDEF" "G" "G" "BCDEF" "" ;;
    ("a") outLine "" "" "BCDE" "F" "BCDEF" "AF" "BCDEG" "" ;;
    ("b") outLine "B" "B" "BCDEF" "BG" "BG" "BG" "ACDEF" "" ;;
    ("c") outLine "" "" "CDE" "BF" "A" "BF" "CDE" "" ;;
    ("d") outLine "F" "F" "BCDEF" "AF" "AF" "AF" "BCDEG" "" ;;
    ("e") outLine "" "" "BCDE" "AF" "ABCDEF" "A" "BCDE" "" ;;
    ("f") outLine "CDE" "B" "B" "ABCD" "B" "B" "B" "" ;;
    ("g") outLine "" "" "BCDEG" "AF" "AF" "BCDE" "F" "BCDE" ;;
    ("h") outLine "B" "B" "BCDE" "BF" "BF" "BF" "ABF" "" ;;
    ("i") outLine "C" "" "BC" "C" "C" "C" "ABCDE" "" ;;
    ("j") outLine "D" "" "CD" "D" "D" "D" "AD" "BC" ;;
    ("k") outLine "B" "BE" "BD" "BC" "BD" "BE" "ABEF" "" ;;
    ("l") outLine "AB" "B" "B" "B" "B" "B" "ABC" "" ;;
    ("m") outLine "" "" "ACEF" "ABDG" "ADG" "ADG" "ADG" "" ;;
    ("n") outLine "" "" "BDE" "BCF" "BF" "BF" "BF" "" ;;
    ("o") outLine "" "" "BCDE" "AF" "AF" "AF" "BCDE" "" ;;
    ("p") outLine "" "" "ABCDE" "BF" "BF" "BCDE" "B" "AB" ;;
    ("q") outLine "" "" "BCDEG" "AF" "AF" "BCDE" "F" "FG" ;;
    ("r") outLine "" "" "ABDE" "BCF" "B" "B" "AB" "" ;;
    ("s") outLine "" "" "BCDE" "A" "BCDE" "F" "ABCDE" "" ;;
    ("t") outLine "C" "C" "ABCDE" "C" "C" "C" "DE" "" ;;
    ("u") outLine "" "" "AF" "AF" "AF" "AF" "BCDEG" "" ;;
    ("v") outLine "" "" "AG" "BF" "BF" "CE" "D" "" ;;
    ("w") outLine "" "" "AG" "AG" "ADG" "ADG" "BCEF" "" ;;
    ("x") outLine "" "" "AF" "BE" "CD" "BE" "AF" "" ;;
    ("y") outLine "" "" "BF" "BF" "BF" "CDE" "E" "BCD" ;;
    ("z") outLine "" "" "ABCDEF" "E" "D" "C" "BCDEFG" "" ;;
    ("A") outLine "D" "CE" "BF" "AG" "ABCDEFG" "AG" "AG" "" ;;
    ("B") outLine "ABCDE" "AF" "AF" "ABCDE" "AF" "AF" "ABCDE" "" ;;
    ("C") outLine "CDE" "BF" "A" "A" "A" "BF" "CDE" "" ;;
    ("D") outLine "ABCD" "AE" "AF" "AF" "AF" "AE" "ABCD" "" ;;
    ("E") outLine "ABCDEF" "A" "A" "ABCDE" "A" "A" "ABCDEF" "" ;;
    ("F") outLine "ABCDEF" "A" "A" "ABCDE" "A" "A" "A" "" ;;
    ("G") outLine "CDE" "BF" "A" "A" "AEFG" "BFG" "CDEG" "" ;;
    ("H") outLine "AG" "AG" "AG" "ABCDEFG" "AG" "AG" "AG" "" ;;
    ("I") outLine "ABCDE" "C" "C" "C" "C" "C" "ABCDE" "" ;;
    ("J") outLine "BCDEF" "D" "D" "D" "D" "BD" "C" "" ;;
    ("K") outLine "AF" "AE" "AD" "ABC" "AD" "AE" "AF" "" ;;
    ("L") outLine "A" "A" "A" "A" "A" "A" "ABCDEF" "" ;;
    ("M") outLine "ABFG" "ACEG" "ADG" "AG" "AG" "AG" "AG" "" ;;
    ("N") outLine "AG" "ABG" "ACG" "ADG" "AEG" "AFG" "AG" "" ;;
    ("O") outLine "CDE" "BF" "AG" "AG" "AG" "BF" "CDE" "" ;;
    ("P") outLine "ABCDE" "AF" "AF" "ABCDE" "A" "A" "A" "" ;;
    ("Q") outLine "CDE" "BF" "AG" "AG" "ACG" "BDF" "CDE" "FG" ;;
    ("R") outLine "ABCD" "AE" "AE" "ABCD" "AE" "AF" "AF" "" ;;
    ("S") outLine "CDE" "BF" "C" "D" "E" "BF" "CDE" "" ;;
    ("T") outLine "ABCDEFG" "D" "D" "D" "D" "D" "D" "" ;;
    ("U") outLine "AG" "AG" "AG" "AG" "AG" "BF" "CDE" "" ;;
    ("V") outLine "AG" "AG" "BF" "BF" "CE" "CE" "D" "" ;;
    ("W") outLine "AG" "AG" "AG" "AG" "ADG" "ACEG" "BF" "" ;;
    ("X") outLine "AG" "AG" "BF" "CDE" "BF" "AG" "AG" "" ;;
    ("Y") outLine "AG" "AG" "BF" "CE" "D" "D" "D" "" ;;
    ("Z") outLine "ABCDEFG" "F" "E" "D" "C" "B" "ABCDEFG" "" ;;
    (".") outLine "" "" "" "" "" "" "D" "" ;;
    (",") outLine "" "" "" "" "" "E" "E" "D" ;;
    (":") outLine "" "" "" "" "D" "" "D" "" ;;
    ("!") outLine "D" "D" "D" "D" "D" "" "D" "" ;;
    ("/") outLine "G" "F" "E" "D" "C" "B" "A" "" ;;
    ("\\") outLine "A" "B" "C" "D" "E" "F" "G" "" ;;
    ("|") outLine "D" "D" "D" "D" "D" "D" "D" "D" ;;
    ("+") outLine "" "D" "D" "BCDEF" "D" "D" "" "" ;;
    ("-") outLine "" "" "" "BCDEF" "" "" "" "" ;;
    ("*") outLine "" "BDF" "CDE" "D" "CDE" "BDF" "" "" ;;
    ("=") outLine "" "" "BCDEF" "" "BCDEF" "" "" "" ;;
    (*) outLine "ABCDEFGH" "AH" "AH" "AH" "AH" "AH" "AH" "ABCDEFGH" ;;
    esac
}

function outArg
{
  typeset l=${#1} c r
  for ((c=0; c<l; c++))
  do
    outChar "${1:$c:1}"
  done
  echo
  for ((r=0; r<8; r++))
  do
    printf "%-*.*s\n" "${COLUMNS:-80}" "${COLUMNS:-80}" "${raw[r]}"
    raw[r]=""
  done
}

for i
do
  outArg "$i"
  echo
done


Last edited by vidyadhar85; 07-03-2013 at 06:23 AM..
These 2 Users Gave Thanks to vidyadhar85 For This Post:
# 3  
Old 07-03-2013
hi i tried ur help as below
Code:
 cat<<EOF
> HELLO
> EOF
HELLO

i am getting the above result,same as the given.Smilie

---------- Post updated at 04:29 AM ---------- Previous update was at 04:25 AM ----------

hi vidhyathar ,
It really works great.thank u so muchSmilieSmilieSmilieSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need Linux equivalent for UNIX

I have a folder called "log" which has a few sub-folders say "fda" "fd7" "fdd" "fd6 .... " I wish to fire the below command inside each subfolder starting with the folder with the latest time stamp. grep "$greptime.*exit" Prod.$(hostname).log | grep $fdrdate_new If the seach did not yield... (3 Replies)
Discussion started by: mohtashims
3 Replies

2. Red Hat

NFS_v4_fail_over_timeout equivalent in Linux

Hi, I need to mount a replicated nfs4 export on a number of AIX and Redhat hosts. To get the failover on the clients working smoothly, I need to change certain values on the AIX boxes like nfs_v4_fail_over_timeout, timeo and retrans values. Since I have no clue about Linux, I am not quite sure... (1 Reply)
Discussion started by: zxmaus
1 Replies

3. Shell Programming and Scripting

Banner command equivalent in Linux

Hi guys can i get banner equivalent command in linux. I am using Linux xcclx0619.target.com 2.6.18-308.11.1.el5xen #1 SMP Fri Jun 15 16:19:17 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux (1 Reply)
Discussion started by: mohanalakshmi
1 Replies

4. Red Hat

xclock comand not found

hi rhel6 gurus i have set up a rhel6.2 db server. i have data base admins needing to connect to this rhel6 derver via reflectionx. reflectionx is set correctly but when attempting to test connectivity by 'xclock' the following message pops up : -bash:xclock; command not found. anyone out... (1 Reply)
Discussion started by: jsynodin
1 Replies

5. Linux

/etc/netmasks equivalent in linux

Hi Guys, I am used to configuring DHCP on Solaris and foreach subnet added I place a corresponding entry in /etc/netmasks. I am now looking at configuring DHCP on linux, is there an equivalnet entry required somewhere or is this not needed in linux Thanks (3 Replies)
Discussion started by: eeisken
3 Replies

6. Programming

WSAAsyncSelect equivalent for linux

Hello, I'm writing a multi-threaded socket server in C++ and I needed something like wsaasyncselect to handle messages like fd_accept, fd_read, fd_connect, fd_close. Thanks in advance. (2 Replies)
Discussion started by: lucastonon
2 Replies

7. Linux

Linux equivalent for...

I moved to a Linux system from Windows a few months ago. Most of the programs I had been using were already native to Linux (Firefox, the GIMP, Pari, etc.) and most others I found a close enough program (Crimson Editor -> gedit, Visual Studio -> KDevelop, Primo -> Morain's ECPP). Now I'm down... (1 Reply)
Discussion started by: CRGreathouse
1 Replies

8. Linux

Mksysb Equivalent For Linux?

I have experience with making bootable images of AIX systems using mksysb and wondered if there was some type of equivalent software for Linux. Or perhaps some of the folks here have alternatives or unique ideas for how they are backing up their Linux systems enabling them to recover them as... (13 Replies)
Discussion started by: scotbuff
13 Replies

9. Shell Programming and Scripting

banner:command not found

hi, When i execute banner command the output is being displayed as banner:command not found When ever i give yum install banner the output is Loading "installonlyn" plugin Setting up Install Process Setting up repositories Parsing package install arguments Nothing to do what... (8 Replies)
Discussion started by: prakashreddy
8 Replies

10. Linux

Linux equivalent for daemon2

Hi all... In my Unix system a program exists called "daemon2" which is responsible to enqueue program executions. For example, if I want to make the system to enqueue lpr executions for certain users, I call daemon2 with lpr as the parameter. Is there an equivalent in Linux? Thanks Jaime (0 Replies)
Discussion started by: jstuardo
0 Replies
Login or Register to Ask a Question