Sponsored Content
Full Discussion: Format the output of file
Top Forums Shell Programming and Scripting Format the output of file Post 96848 by getdpg on Tuesday 24th of January 2006 08:30:45 AM
Old 01-24-2006
Format the output of file

hello all

Script and example of file
#!/bin/sh
#sh gdata.sh /users/testsuite/db/appl/

DATE=`date '+20%y-%m-%d'`
echo $DATE
for i in ${1}/$DATE/* ; do
find $i -name daily -prune -o -name run.log -print -exec grep -c ! {} \; done > test.log.


The test.log contains output like this

/users/testsuite/db/appl/2006-01-24/Devel/Sun/run.log
19
/users/testsuite/db/appl/2006-01-24/Devel/Linus/run.log
20
/users/testsuite/db/appl/2006-01-24/9/Sun/run.log
10
/users/testsuite/db/appl/2006-01-24/8/Sun/run.log
19

But i want to cut and format my file like this

Date : 2006-01-24

Version Host Fails
Devel Sun 19
Devel Linu 20
9 Sun 10
8 Sun 19


Please help me to modify this script
. I have to show this staticts on web . Thanks a lot
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Output format - comparison with I/p file

Hi, I have a file which contains more than 1 lakh records like following: a. name, id, city, state, country, phone (Expected I/P file format) name, id, city,, state, country, phone (Current I/P file format ) I want to achieve following tasks, a, Remove the extra comma in the... (1 Reply)
Discussion started by: velappangs
1 Replies

2. Shell Programming and Scripting

format the output from a file

hi , i need to format the output which is availble in a file file output is Following are the Process_Scheduler Domains running in the server Ram-pc VPORCL Following are the Application Server domains running in the server Ram-pc VPORCL01 VPORCL02 these value VPORCL,VPORCL01...... (5 Replies)
Discussion started by: becksram123
5 Replies

3. Shell Programming and Scripting

format file output

Hi, I am trying to put a script together that allows for a command to be executed and then the output goes to a .html file. I am running the script on HPUX. I run: /var/fl/user/lmutil lmstat -a -c license_lic.dat > /web/results.html This saves the command to a .html file but the text is... (1 Reply)
Discussion started by: zerbitated
1 Replies

4. Shell Programming and Scripting

format output in csv file

I am sending the output of a file to .csv file. The output should look like this: Total Customers Processed:,8 Total Customers Skipped:,0 Total Customers Added:,8 Total Customers Changed:,0 Total Policies Deleted:,0 Total Policies Failed:,0 total:,8 Now i want this output in... (1 Reply)
Discussion started by: Prashant Jain
1 Replies

5. Shell Programming and Scripting

Change file output format

I have a file which has following contents usmtnz-dinfsi19 62 61 18400 18800 99.7 usmtnz-dinfsi19 62 61 18400 18800 99.7 i want the o/p to be like date (7 Replies)
Discussion started by: fugitive
7 Replies

6. Shell Programming and Scripting

Dynamic output file generation using a input text file with predefined output format

Hi, I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format. Example: File.txt AP|{SSHA}VEEg42CNCghUnGhCVg== APVG3|{SSHA}XK|"password" AP3|{SSHA}XK|"This is test" .... etc --------- test.sh has... (1 Reply)
Discussion started by: hudson03051nh
1 Replies

7. Shell Programming and Scripting

Help me to command to output file format.

Dear Master. Help me to command to out put. Ex log. "<?xml version=""1.0"" encoding=""UTF-10"" ?><anova-test-bom> <txid>17251032659</txid> <authentication> <user>admin</user> <password>Amrduoi</password> </authentication> <destination> <msisdn>1111111</msisdn> ... (2 Replies)
Discussion started by: ooilinlove
2 Replies

8. Shell Programming and Scripting

format a file to this output

hi i need some help over here.. please help i have a log file as per below --------------------------------------------------------------------------------------------------------- JOB START DATE : 20110510204513 JOB ID : us2cap3ds9... (6 Replies)
Discussion started by: sitaldip
6 Replies

9. Shell Programming and Scripting

Match list of strings in File A and compare with File B, C and write to a output file in CSV format

Hi Friends, I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving... File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies

10. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies
files(4)						     Kernel Interfaces Manual							  files(4)

NAME
files - File control database (Enhanced Security) DESCRIPTION
The file control database (/etc/auth/system/files) is designed to help the Information System Security Officer (ISSO) maintain the integrity of the system. The database contains entries for system data files and executable files that require certain attributes. Some files require certain attributes to provide protection against unauthorized access, while others require a specific set of attributes to accomplish their intended function. The database is used by the library routine create_file_securely() to determine the set of attributes for a newly created file. Many pro- grams associated with the trusted computing base (TCB) use this library routine for file creation to ensure that file attributes are set correctly. A broad range of attributes can be specified in the file control database. Specific choices depend upon the exact system configuration. These choices are as follows: This field specifies the owner name for the entry. If an owner name is not specified and the entry is created using create_file_securely, the owner of the file will be the real user ID of the process creating the file. This field specifies the group name for the entry. If a group name is not specified and the entry is created using create_file_securely, the group of the file will be the real group ID of the process creating the file. This field specifies the mode word for the entry. If the mode word is not specified and create_file_securely is used to create the entry, a mode word of 0 (zero) is assigned to the new file. This field identifies the type of the entry. This field is not taken into account by create_file_securely when a file is being created. The library routine will only create regular files. Choices for the type field are as follows: Regular file Directory FIFO device (pipe) Character special device Block special device Socket EXAMPLES
The following example is a typical file control database entry for the program /sbin/newfs: /sbin/newfs:f_owner=root:f_group=bin: :f_type=r:f_mode#04111: :chkent: This entry specifies that the newfs program has bin as its owner and group, that it is a regular file, and that its mode is 0111 The following example shows an entry for a site-specific directory that contains help files for an application: /appl/help_files:f_owner=appadmin:f_group=appl: :f_type=d:f_mode#0750: :chkent; This entry specifies the owner of the /appl/help_files directory as appadmin, the group as appl, and the mode as 0750. FILES
Specifies the pathname of the file control database. RELATED INFORMATION
Functions: getprfient(3) Files: authcap(4) delim off files(4)
All times are GMT -4. The time now is 10:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy