Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Script that verify output after make Post 303043800 by indeed_1 on Friday 7th of February 2020 04:42:08 AM
Old 02-07-2020
Script that verify output after make

Hi

I write below script to show if expected file exist in /etc/library/ , print success else failed. But it will print full path I just need to print module name in output. And if it possible show time that spent to compile each module.

FYI 1: First run another script just go to the paths and run “make clean; make”¯ on each module to compile source code, after that put result in /etc/library/. After that this script check if module compile successfully or not!

FYI 2: after run compile.sh it will create logfile that print lot's of info I just need to show error that belong to the fail module.

1-compile.sh > (create logfile)
2-verify.sh (check expected file and if not exist grep that section of logfile that belong to this module )

Here is the verify.sh

Code:
for f in /etc/library/{module1,module2,moduleN}; do

  if [ -f "$f" ]; then
    echo "$f Build [Success]"
  else
    echo "$f Build [Failed]"
  fi
done



Current result:

Code:
/etc/library/ module1 Build [Success]
/etc/library/ module2 Build [Failed]      
/etc/library/ moduleN Build [Success]



Expected result:

Code:
module1 Build [Success] 2s
module2 Build [Failed] 8s         related library not exist for module2
moduleN Build [Success] 58s

Any recommendation?
 

10 More Discussions You Might Find Interesting

1. Solaris

Making sense of df -k & format verify output

I'm posting the output from two disks on my Solaris machine. The first part is the output from using the format command and then using the verify option on each disk. The last part is the output from my df -k command. I'm trying to match the partition to the filesystem/mount point. I'm assuming... (13 Replies)
Discussion started by: gonzotonka
13 Replies

2. Shell Programming and Scripting

Script to verify SSH is running

Writing a simple test script that looks for ssh, kills if its running and verifies if its still running. If it isn't, move on. My issue, its cause I don't know how, is to verify if ssh is running still. Also, is there a way have this do this on a remote server? I already have the ssh keys... (7 Replies)
Discussion started by: djinn
7 Replies

3. Shell Programming and Scripting

how to make a line BLINKING in output and also how to increase font size in output

how to make a line BLINKING in output and also how to increase font size in output suppose in run a.sh script inside echo "hello world " i want that this should blink in the output and also the font size of hello world should be big .. could you please help me out in this (3 Replies)
Discussion started by: mail2sant
3 Replies

4. Shell Programming and Scripting

Help needed with script to verify the version of BIND

I have tried thought of using instfix -ivqc | grep BIND , but this did not return the result I was looking for; it seem to list out the the different patches that had been applied to BIND. I'm actually looking for overall version, like you'd get when checking the OS level for instance. (1 Reply)
Discussion started by: sport
1 Replies

5. Shell Programming and Scripting

script to verify backup is succesfull or not

tail -30 /opt/oracle/rmanbkup/log/db_backup_JONDB.log input datafile fno=00005 name=+ORA_DATA/jondb/datafile/users.264.696728295 input datafile fno=00003 name=+ORA_DATA/jondb/datafile/sysaux.261.696728281 input datafile fno=00001 name=+ORA_DATA/jondb/datafile/system.259.696728257 input datafile... (6 Replies)
Discussion started by: arch12
6 Replies

6. UNIX for Advanced & Expert Users

Verify file was sftp'd via bash script

Hello Experts, I have a script that that transfers a file (via sftp) and it works fine but we ran into a snag where the target server asked for the ssh key and the script didn't know what to do. I want to add some logic to this script that at least sends an email that it didn't complete as... (4 Replies)
Discussion started by: Tiberius777
4 Replies

7. Shell Programming and Scripting

DNS circular verify script

I have modified a script to do a circular DNS look up. The theory is this for a given subnet build a range if IP's do a reverse look up on those IP's take the output of the reverse look up then and do a forward look up If the returns match up give a good status If not return a fail... (1 Reply)
Discussion started by: snoman1
1 Replies

8. UNIX for Advanced & Expert Users

Script to verify veritas mirror

Hi Experts, I have lot of Solaris servers and in most of them, root disk is mirrored in rootdg. I just want to check all servers, if there is any server whose root disk is not mirrored. Either it may be with detached plexes or not mirrored at all. I can run a for loop for all servers. Can... (4 Replies)
Discussion started by: solaris_1977
4 Replies

9. Shell Programming and Scripting

Perl script to verify that a value is present in an array (list)

I have 2 files , i need compare both files field by field, and in the fourth field some value will be interchaged and some value will be **. ex: file1 john|0.0|4|**:25;JP:50;UY:25 file2 john|0.0|4|JP:50;**:25;UY:25 (4 Replies)
Discussion started by: veeruasu
4 Replies

10. Shell Programming and Scripting

Shell script verify connection to Oracle if not successful

i have a script that connects to the oracle database and executes the query statements. it works fine and i would like to add some message to check if the connection to oracle is not successful. basically this is the code snippet: #!/bin/sh ... ... ... sqlplus -s username/password@dbName... (2 Replies)
Discussion started by: wtolentino
2 Replies
Net::Sieve::Script(3pm) 				User Contributed Perl Documentation				   Net::Sieve::Script(3pm)

NAME
Net::Sieve::Script - Parse and write sieve scripts SYNOPSIS
use Net::Sieve::Script; my $test_script = 'require "fileinto"; # Place all these in the "Test" folder if header :contains "Subject" "[Test]" { fileinto "Test"; }'; my $script = Net::Sieve::Script->new ($test_script); print "OK" if ( $script->parsing_ok ) ; print $script->write_script; or my $script = Net::Sieve::Script->new(); my $cond = Net::Sieve::Script::Condition->new('header'); $cond->match_type(':contains'); $cond->header_list('"Subject"'); $cond->key_list('"Re: Test2"'); my $actions = 'fileinto "INBOX.test"; stop;'; my $rule = Net::Sieve::Script::Rule->new(); $rule->add_condition($cond); $rule->add_action($actions); $script->add_rule($rule); print $script->write_script; DESCRIPTION
Manage sieve script Read and parse file script, make Net::Sieve::Script::Rule, Net::Sieve::Script::Action, Net::Sieve::Script::Condition objects Write sieve script Support RFC 5228 - sieve base RFC 5231 - relationnal RFC 5230 - vacation Draft regex missing 5229 variables 5232 imapflags 5233 subaddress 5235 spamtest notify draft CONSTRUCTOR
new Argument : optional text script Purpose : if param, put script in raw, parse script Return : main Script object Accessors : ->raw() : read or set original text script ->require() : require part of script ->rules() : array of rules ->max_priority() : last rule id METHODS
parsing_ok return 1 on raw parsing success write_script Purpose : write full script, require and rules parts Return : set current require, return rules ordered by priority in text format equals $object->equals($test_object): return 1 if $object and $test_object are equals read_rules $script->read_rules() : read rules from raw $script->read_rules($some_text) : parse text rules use of read_rules set $script->rules() Return 1 on success find_rule Return Net::Sieve::Script::Rule pointer find by priority Return 0 on error, 1 on not find swap_rules Swap priorities, now don't take care of if/else/elsif Return 1 on success, 0 on error reorder_rules Reorder rules with a list of number, start with 1, and with blanck separator. Usefull for ajax sort functions. Thank you jeanne for your help in brain storming. Return 1 on success, 0 on error delete_rule Delete rule and change priority, delete rule take care for 'if' test if deleted is 'if' delete next if next is 'else' change next in 'if' next is 'elsif' Return : 1 on success, 0 on error add_rule Purpose : add a rule in end of script Return : priority on success, 0 on error Argument : Net::Sieve::Script::Rule object BUGS
Rewrite a hand made script will lose comments. Verify parsing success with parsing_ok method before write a new script. SUPPORT
Please report any bugs or feature requests to "bug-net-sieve-script at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Sieve-Script>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. AUTHOR
Yves Agostini - Univ Metz - <agostini@univ-metz.fr> <http://www.crium.univ-metz.fr> COPYRIGHT
Copyright 2008 Yves Agostini - <agostini@univ-metz.fr> This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. SEE ALSO
Net::Sieve perl v5.10.0 2008-09-15 Net::Sieve::Script(3pm)
All times are GMT -4. The time now is 06:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy