Sponsored Content
Top Forums Shell Programming and Scripting Reduce the number of lines in script Post 302851363 by Vikram_Tanwar12 on Sunday 8th of September 2013 11:31:04 AM
Old 09-08-2013
Thanks for the reply.

Actually iam checking these error from a single log file. It consist around 900-1000 Lines. I need to check error staring from one section of report to the starting of other.for example take the below log.

Code:
aaaaaaaaa
bbbbbbbbbbb
Main Report
Unable to add file 1
Unable to add file 3
Unable to find file 2
Unable to find file 5
Main Report End
ttttttttttttt
uuuuuuuuuuu
Second Report
Unable to add file 56
Unable to add file 89
Unable to find file 484
Unable to find file 899
Second Report End

So in this way i have to find from the same log that how many files failed due to Unable to add and Unable to find reason in between Main Report start and End Section and Second Report start and End section.

---------- Post updated at 10:31 AM ---------- Previous update was at 09:49 AM ----------

Also iam getting values in variable in single line like the below

Code:
echo $v1
Unable to add file 56 Unable to add file 89

But iam looking for the below one
Code:
Unable to add file 56
Unable to add file 89

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

need inputs on how i can change my script to reduce amount of time the script takes

HI , I have a list1 which consists of data that i have to search and a list2 which has the files that need to be searched .So basically i am using list1 on list2 to see if list1 data is present if found replace it .I have written the code using foreach loop for each list .This is taking the... (1 Reply)
Discussion started by: madhul2002
1 Replies

2. UNIX for Dummies Questions & Answers

How to reduce multiple files into a specific number of files

Can anyone please let me know how do I reduce files into a specific number of files by cat'ing files? For example: 15 files must be reduced to 1 or 5 or 9 (possible values 1 to 14) (5 Replies)
Discussion started by: aryanbelank
5 Replies

3. Shell Programming and Scripting

Script to split files based on number of lines

I am getting a few gzip files into a folder by doing ftp to another server. Once I get them I move them to another location .But before that I need to make sure each gzip is not more than 5000 lines and split it up . The files I get are anywhere from 500 lines to 10000 lines in them and is in gzip... (4 Replies)
Discussion started by: gubbu
4 Replies

4. Shell Programming and Scripting

perl script on how to count the total number of lines of all the files under a directory

how to count the total number of lines of all the files under a directory using perl script.. I mean if I have 10 files under a directory then I want to count the total number of lines of all the 10 files contain. Please help me in writing a perl script on this. (5 Replies)
Discussion started by: adityam
5 Replies

5. Shell Programming and Scripting

To reduce the bash script length!!!

Hi friends, at last i finish my script to find the status of the URL , in this code i used all the status codes, because of this it take too much of length. with the help of wiki only i find all the status codes. Status codes in HTTP #!/bin/bash timevar=`date +%d-%m-%Y_%H.%M.%S` #--... (6 Replies)
Discussion started by: anishkumarv
6 Replies

6. UNIX and Linux Applications

Looking to reduce the number a cpus available for SGE

Hey all Im looking to reduce the number of cpus available on a certain node in our cluster available for jobs using SGE. i.e. we have one node that has 24 cpus available for jobs on SGE, i would like to reduce that to 16. Thanks (1 Reply)
Discussion started by: olifu02
1 Replies

7. UNIX for Dummies Questions & Answers

Writing a script to print the number of lines in multiple files

Hi I have 1000 files labelled data1.txt through data1000.txt. I want to write a script that prints out the number of lines in each txt file and outputs it in the following format: Column 1: number of data file (1 through 1000) Column 2: number of lines in the text file Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies

8. Shell Programming and Scripting

[Solved] Script to concatenate 2 files with the same number of lines

Hi everyone, I have two files, namely: file1: file1Col1Row1;file1Col2Row1;file1Col3Row1 file1Col1Row2;file1Col2Row2;file1Col3Row2 file1Col1Row3;file1Col2Row3;file1Col3Row3file2: file2Col1Row1;file2Col2Row1;file2Col3Row1 file2Col1Row2;file2Col2Row2;file2Col3Row2... (0 Replies)
Discussion started by: gacanepa
0 Replies

9. Shell Programming and Scripting

Reduce the number of lines by using Array

I have the following code to count the number of how many times the name occurred in one file. The code is working fine and the output is exactly what I want. The problem is the real code has more than 50 names in function listname which cause function name to have more than 50 case ,and function... (14 Replies)
Discussion started by: samsan
14 Replies

10. UNIX for Beginners Questions & Answers

Print number of lines for files in directory, also print number of unique lines

I have a directory of files, I can show the number of lines in each file and order them from lowest to highest with: wc -l *|sort 15263 Image.txt 16401 reference.txt 40459 richtexteditor.txt How can I also print the number of unique lines in each file? 15263 1401 Image.txt 16401... (15 Replies)
Discussion started by: spacegoose
15 Replies
Datatypes(3)						       globus gsi sysconfig						      Datatypes(3)

NAME
Datatypes - Enumerations enum globus_gsi_sysconfig_error_t { GLOBUS_GSI_SYSCONFIG_ERROR_SUCCESS = 0, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_CERT_DIR = 1, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_CERT_STRING = 2, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_KEY_STRING = 3, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_HOME_DIR = 4, GLOBUS_GSI_SYSCONFIG_ERROR_ERRNO = 5, GLOBUS_GSI_SYSCONFIG_ERROR_CHECKING_FILE_EXISTS = 6, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_CERT_FILENAME = 7, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_PROXY_FILENAME = 8, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_DELEG_FILENAME = 9, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_CA_CERT_FILENAMES = 10, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_CWD = 11, GLOBUS_GSI_SYSCONFIG_ERROR_REMOVING_OWNED_FILES = 12, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_GRIDMAP_FILENAME = 13, GLOBUS_GSI_SYSCONFIG_ERROR_CHECKING_SUPERUSER = 14, GLOBUS_GSI_SYSCONFIG_ERROR_SETTING_PERMS = 15, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_SIGNING_POLICY = 16, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_PW_ENTRY = 17, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_AUTHZ_FILENAME = 18, GLOBUS_GSI_SYSCONFIG_ERROR_FILE_NOT_REGULAR = 19, GLOBUS_GSI_SYSCONFIG_ERROR_FILE_DOES_NOT_EXIST = 20, GLOBUS_GSI_SYSCONFIG_ERROR_FILE_BAD_PERMISSIONS = 21, GLOBUS_GSI_SYSCONFIG_ERROR_FILE_NOT_OWNED = 22, GLOBUS_GSI_SYSCONFIG_ERROR_FILE_IS_DIR = 23, GLOBUS_GSI_SYSCONFIG_ERROR_FILE_ZERO_LENGTH = 24, GLOBUS_GSI_SYSCONFIG_INVALID_ARG = 25, GLOBUS_GSI_SYSCONFIG_ERROR_FILE_HAS_LINKS = 26, GLOBUS_GSI_SYSCONFIG_ERROR_FILE_HAS_CHANGED = 27, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_AUTHZ_LIB_FILENAME = 28, GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_GAA_FILENAME = 29, GLOBUS_GSI_SYSCONFIG_ERROR_FILE_NOT_DIR = 30, GLOBUS_GSI_SYSCONFIG_ERROR_LAST = 31 } enum globus_gsi_proxy_file_type_t { GLOBUS_PROXY_FILE_INPUT, GLOBUS_PROXY_FILE_OUTPUT } Enumeration Type Documentation enum globus_gsi_sysconfig_error_t GSI System Config Error codes. Enumerator: GLOBUS_GSI_SYSCONFIG_ERROR_SUCCESS Success - never used. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_CERT_DIR Unable to determine trusted certificates directory. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_CERT_STRING Error while generating certificate filename. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_KEY_STRING Error while generating private key filename. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_HOME_DIR Unable to determine user's home directory. GLOBUS_GSI_SYSCONFIG_ERROR_ERRNO System Error -- see underlying error for details. GLOBUS_GSI_SYSCONFIG_ERROR_CHECKING_FILE_EXISTS Unable to determine whether file exists. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_CERT_FILENAME Unable to determine the location of the certificate file. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_PROXY_FILENAME Unable to determine the location of the proxy file. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_DELEG_FILENAME Unable to determine the location of the delegated proxy file. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_CA_CERT_FILENAMES Unable to generate a list of CA certificate filenames. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_CWD Error while dircovering the current working directory. GLOBUS_GSI_SYSCONFIG_ERROR_REMOVING_OWNED_FILES Failed to remove all proxy files. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_GRIDMAP_FILENAME Unable to determine the location of the grid map file. GLOBUS_GSI_SYSCONFIG_ERROR_CHECKING_SUPERUSER Failure while checking whether the current user is the super user. GLOBUS_GSI_SYSCONFIG_ERROR_SETTING_PERMS Error while trying to set file permissions. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_SIGNING_POLICY Unable to determine the location of a signing policy file. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_PW_ENTRY Could not find password entry for user. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_AUTHZ_FILENAME Failed to locate the authorization callout configuration file. GLOBUS_GSI_SYSCONFIG_ERROR_FILE_NOT_REGULAR File is not a regular file. GLOBUS_GSI_SYSCONFIG_ERROR_FILE_DOES_NOT_EXIST File does not exist. GLOBUS_GSI_SYSCONFIG_ERROR_FILE_BAD_PERMISSIONS File has incorrect permissions for operation. GLOBUS_GSI_SYSCONFIG_ERROR_FILE_NOT_OWNED File is not owned by current user. GLOBUS_GSI_SYSCONFIG_ERROR_FILE_IS_DIR File is a directory. GLOBUS_GSI_SYSCONFIG_ERROR_FILE_ZERO_LENGTH File has zero length. GLOBUS_GSI_SYSCONFIG_INVALID_ARG Invalid argument. GLOBUS_GSI_SYSCONFIG_ERROR_FILE_HAS_LINKS File has more than one link. GLOBUS_GSI_SYSCONFIG_ERROR_FILE_HAS_CHANGED File has changed in the meantime. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_AUTHZ_LIB_FILENAME Failed to locate the authorization callout library configuration file. GLOBUS_GSI_SYSCONFIG_ERROR_GETTING_GAA_FILENAME Failed to locate the gaa configuration file. GLOBUS_GSI_SYSCONFIG_ERROR_FILE_NOT_DIR File is not a directory. GLOBUS_GSI_SYSCONFIG_ERROR_LAST Last marker - never used. enum globus_gsi_proxy_file_type_t Enumerator used to keep track of input/output types of filenames. Enumerator: GLOBUS_PROXY_FILE_INPUT The proxy filename is intended for reading (it should already exist) GLOBUS_PROXY_FILE_OUTPUT The proxy filename is intended for writing (it does not need to exist) Author Generated automatically by Doxygen for globus gsi sysconfig from the source code. Version 5.2 Mon Apr 30 2012 Datatypes(3)
All times are GMT -4. The time now is 12:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy