Sponsored Content
Top Forums Shell Programming and Scripting Customize the Shell Script output Post 302933326 by kshji on Thursday 29th of January 2015 11:36:40 AM
Old 01-29-2015
Something like this
Code:
awk     '
        NR<=3          {next}
         L[$3]==""      {L[$3]=1}

                        {L[$3]=L[$3] && ($7=="Alive")}

         END            {printf "OK|"
                           for  (l in L) {
                                str=l
                                str=toupper(substr(str,1,1)) substr(str,2)
                                printf "%s=%s ", str, L[l]
                                }
                         printf "\n"
                        }
        '  output
# print output:
OK|Gaas=1 Menu=1 Sws=1 Report=1 Officeauto=1 Dcm-daemon=0 Archive=1 Workflow=1 Logloaderd=0 DSA=0 Home=0 HTTP_Server=1 WebCacheAdmin=1 GamWS=1 Messenger=1 WebCache=1

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How can I customize my login script?

Hi, I am realatively new to UNIX (I started 1 week ago), and I need some help on an assignment. I am trying to find the file that will allow me to modify my login. I did some research, and most of my sources tell me to modify the ~/.cshrc and ~/.login files. The problem is that I cannot find... (1 Reply)
Discussion started by: Hyunkel
1 Replies

2. Shell Programming and Scripting

[How To?] Run shell script and get output into another shell.

Hi guys, I have a simple question, I want to store the output of the following command: As you can see it is running all the time, and we get a new line every 3sec. I just want to store these new lines into a single variable, so I can use it into a script. To clear the screen, and... (4 Replies)
Discussion started by: Thireus
4 Replies

3. Shell Programming and Scripting

help me with customize script.

Hi forum members, I have customize command which is opening in one user and while I am try from my user it is not working and getting the message KSH not found. This command is used to open encrypted file ,this command take arguments file name and option ie plz find the below command. ... (1 Reply)
Discussion started by: sivaranga001
1 Replies

4. UNIX for Advanced & Expert Users

Customize "change password" in unix shell

I want to customize the "change password" through unix shell. when a user's password is expired and he/she logs into shell next time he/she will be asked to change his/her password. At this time when the user provides new password instead of unix doing the "password change" action I want to call my... (4 Replies)
Discussion started by: sharmanikhilesh
4 Replies

5. Shell Programming and Scripting

Shell Script output

Hi All, Below is the shell script for which desired output is required: Shell script: #!/bin/bash . /oracle/TEST/db/tech_st/11.1.0/TEST_<hostname>.env sqlplus /nolog << EOF connect / as sysdba spool /home/oracle/db_output.log @lockwait.sql prompt Database Locks ... (1 Reply)
Discussion started by: a1_win
1 Replies

6. Shell Programming and Scripting

Customize the Shell Script output

Hello guys. i wan to write an script to Customize this output: -------------------+--------------------+---------+--------- ias-component | process-type | pid | status -------------------+--------------------+---------+--------- DSA | DSA | ... (10 Replies)
Discussion started by: Ymir
10 Replies

7. Shell Programming and Scripting

Shell Script function to use script name for log file output

Hi Team - I"m very new to Shell Scripting so I have a rather novice question. My forte is Windows Batch Scripting so I was just wondering what the Shell Script equivalent is to the DOS command %~n? %~n is a DOS variable that dispayed the script name. For instance (in DOS): REM... (11 Replies)
Discussion started by: SIMMS7400
11 Replies

8. Shell Programming and Scripting

A shell script to run a script which don't get terminated and send a pattern from the output by mail

Hi Guys, I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
Discussion started by: Sambit Sahu
11 Replies

9. UNIX for Beginners Questions & Answers

Shell script to call and sort awk script and output

I'm trying to create a shell script that takes a awk script that I wrote and a filename as an argument. I was able to get that done but I'm having trouble figuring out how to keep the header of the output at the top but sort the rest of the rows alphabetically. This is what I have now but it is... (1 Reply)
Discussion started by: Eric7giants
1 Replies
CPANPLUS::Shell(3pm)					 Perl Programmers Reference Guide				      CPANPLUS::Shell(3pm)

NAME
CPANPLUS::Shell SYNOPSIS
use CPANPLUS::Shell; # load the shell indicated by your # config -- defaults to # CPANPLUS::Shell::Default use CPANPLUS::Shell qw[Classic] # load CPANPLUS::Shell::Classic; my $ui = CPANPLUS::Shell->new(); my $name = $ui->which; # Find out what shell you loaded $ui->shell; # run the ui shell DESCRIPTION
This module is the generic loading (and base class) for all "CPANPLUS" shells. Through this module you can load any installed "CPANPLUS" shell. Just about all the functionality is provided by the shell that you have loaded, and not by this class (which merely functions as a generic loading class), so please consult the documentation of your shell of choice. BUG REPORTS
Please report bugs or other issues to <bug-cpanplus@rt.cpan.org<gt>. AUTHOR
This module by Jos Boumans <kane@cpan.org>. COPYRIGHT
The CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. All rights reserved. This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. SEE ALSO
CPANPLUS::Shell::Default, CPANPLUS::Shell::Classic, cpanp perl v5.12.1 2010-04-26 CPANPLUS::Shell(3pm)
All times are GMT -4. The time now is 06:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy