Sponsored Content
Top Forums Shell Programming and Scripting read from a file and calculate values for a specified field Post 302174494 by Franklin52 on Tuesday 11th of March 2008 08:43:33 AM
Old 03-11-2008
Post a part of your file and explain which column you want to totalize under what conditions.
Place your code next time within code tags to improve readability (select your code and press the "#" sign at the toolbar).

Regards
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to sort a field in a file having date values

Hi All, I am having a pipe delimited file .In this file the 3rd column is having date values.I need to get the min date and max date from that file. I have used cut -d '|' test.dat -f 3|sort -u But it is not sorting the date .How to sort the date column using unix commands Thanks ... (4 Replies)
Discussion started by: risshanth
4 Replies

2. Programming

Extracting Field values for XML file

i have an input file of XML type with data like <nx-charging:additional-parameter name="NX_INTERNATIONALIZED_CLID" value="919427960829"/><nx-charging:finalStatus>RESPONSE , Not/Applicable , OK</nx-charging:finalStatus></nx-charging:process> i want to extract data such that i get the output... (3 Replies)
Discussion started by: junaid.nehvi
3 Replies

3. Shell Programming and Scripting

Getting Distinct values from second field in a file....

Hi I have a pipe delimited file. I am trying to grab the DISTINCT value from the second field. The file is something like: 1233|apple|ron 1234|apple|elephant 1235|egg|man the output I am trying to get from second field is apple,egg (apple coming only once) Thanks simi (4 Replies)
Discussion started by: simi28
4 Replies

4. Shell Programming and Scripting

Count the field values in a file

Hi I have a file with contents like : 101,6789556897,0000795369 - seq - fmt_recs187] - avg_recs 101,4678354769,0000835783 - seq - fmt_recs98] - avg_recs 221,5679787008,0001344589 - seq - fmt_recs1283] - avg_recs I need to find the sum of the all the values (which are in bold). here... (6 Replies)
Discussion started by: rkrish
6 Replies

5. Shell Programming and Scripting

Read record from the text file contain multiple separated values & assign those values to variables

I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables. I need to read this file which is an input to my script Config.txt file name, first path, second... (7 Replies)
Discussion started by: ketanraut
7 Replies

6. Shell Programming and Scripting

awk file to read values from Db2 table replacing hard coded values

Hi, I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below... if (start_new_rec=="true"){ exclude_user="false"; user=toupper($6); match(user, "XXXXX."); if (RSTART ==2 ) { ... (9 Replies)
Discussion started by: asandy1234
9 Replies

7. Shell Programming and Scripting

How to calculate avg values of csv file using shell scripting .?

hi all i have a reporting work and i want it to be automated using shell scripting kindly let me know how can i make that possibe . eg data are :... (2 Replies)
Discussion started by: Avinash shaw
2 Replies

8. UNIX for Beginners Questions & Answers

awk GSUB read field values from multiple text files

My program run without error. The problem I am having. The program isn't outputting field values with the column headers to file.txt. Each of the column headers in file.txt has no data. MEMSIZE SECOND SASFoundation Filename The output results in file.txt should show: ... (1 Reply)
Discussion started by: dellanicholson
1 Replies

9. Shell Programming and Scripting

awk to calculate total and percent off field in file

Trying to use awk to print the lines in file that have either REF or SNV in $3, add a header line, sort by $4 in numerical order. The below code does that already, but where I am stuck is on the last part where the total lines are counted and printed under Total_Targets, under Targets_less_than is... (4 Replies)
Discussion started by: cmccabe
4 Replies

10. Shell Programming and Scripting

awk to look up values in File 2 from File 1, & printingNth field of File1 based value of File2 $2

I have two files which are the output of a multiple choice vocab test (60 separate questions) from 104 people (there are some missing responses) and the question list. I have the item list in one file (File1) Item,Stimulus,Choice1,Choice2,Choice3,Choice4,Correct... (5 Replies)
Discussion started by: samonl
5 Replies
BBTIME(1)						      General Commands Manual							 BBTIME(1)

NAME
bbtime - Display the time in a small blackbox style window SYNOPSIS
bbtime [-display <displayname>] [-config <filename>] [-spooldir] [-version] [-help] [[-position] | [-pos]] <position> DESCRIPTION
This manual page documents briefly the bbtime command. bbtime displays the time in a small blackbox style window. OPTIONS
A summary of options are included below. -d[isplay] <displayname> X server to connect to -c[onfig] <filename> Alternate config file -bb[config] <filename> Alternate Blackbox config file -def[ault] Fall back on default configuration -m[ailbox] <filename> Filename of mailbox -v[ersion] Display version number -h[elp] Display this help -p[osition] <position> Set position of window, <position> = [+]|[-]x[+]|[-]y -w[withdrawn] Place bbtool in the Slit -s[hape] Don't display groundplate CONFIGURATION
Blackbox Users: By default bbtime reads the Blackbox style-file as defined in .blackboxrc and copies as much of the style as possible. The result is an application which looks a lot like the toolbar. Further configuration options can be found in bbtime.style. Most likely you want to change these options, copy this file to somewhere in your homedir (eg blackbox/bbtime.config) and edit it. Edit the file .blackboxrc and add or edit the line: bbtime.configFile: <your config file>. WARNING: You have to define the entire PATH. All style options set by reading the Blackbox-style file can be overridden by placing them in bbtime.config (and changing them). See bbtime.style for all possible options. Make sure the file .bbtoolsrc does not exist, else the configuration style for other Window Managers will be used. Users of other Window managers: By default bbtime reads the bbtoolsrc and bbtime.nobb config files. If you want to define your personal config-file copy bbtoolsrc to your homedir as ./.bbtoolsrc. Copy bbtime.nobb somewhere in your homedir. Edit .bbtoolsrc and add or edit the line: bbtime.configFile: <your config file>. WARNING: You have to define the entire PATH. Reconfiguration Press the right mouse-button on the envelope to cause bbtime to re-read its settings. FILES
bbtime automatically copies the style of the blackbox toolbar. It copies: toolbar -> bbtime.frame toolbar.label -> bbtime.label toolbar.color -> bbtime.frame.color toolbar.colorTo -> bbtime.frame.colorTo toolbar.label.color -> bbtime.label.color toolbar.label.colorTo -> bbtime.label.colorTo toolbar.textColor -> bbtime.textColor bevelWidth -> bbtime.bevelWidth WARNING: if .bbtoolsrc is defined it won't copy the blackbox style. For the meaning of the different resources see the comments in the config-files. SEE ALSO
bbdate(1), bbppp(1) AUTHOR
This manual page was written by Chris Tillman <tillman@azstarnet.com> for the Debian GNU/Linux system (but may be used by others). December 29 2001 BBTIME(1)
All times are GMT -4. The time now is 04:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy