07-31-2015
Many thanks all for your help on this.
Suggestions both worked perfectly on my example data.
appreciate the help.
Thanks Don for the explanations.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a various files;each filled with hundreds of line with similar number of fields.
I would like to extract out field $5 from each of this file and aggregate them before printing out to a file.
I tried to :-
#!/usr/bin/awk -f
file="file1.txt file2.txt file3.txt file4.txt"
... (1 Reply)
Discussion started by: ahjiefreak
1 Replies
2. Shell Programming and Scripting
hi
i hav a file like
121212 asdd d 7 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 5 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 5 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 4 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 6 dfsdffdffsdfsdfsdfdf rrretrtrtre
i need to... (4 Replies)
Discussion started by: Satyak
4 Replies
3. Shell Programming and Scripting
Hello there.
I want some help with awk
I have this script that reads a file from awk and you can insert from keyboard any list from the fields that exist so to be printed on monitor
echo "give a choice"
read -a ans
array=${ans}
awk -F: -v k="$array" '{
... (4 Replies)
Discussion started by: covis
4 Replies
4. Shell Programming and Scripting
Hi,
I wrote an awk script to analyse file A.
I call the script with files A and B. File A has lines like:
000000033100001
000000036100001
000000039100001
The first 9 characters are interpreted as a line number;
for each line number found I want to output this line number of file B.
... (13 Replies)
Discussion started by: kpg
13 Replies
5. Shell Programming and Scripting
######################## SOLVED ##################
Hi
I have a header file like the following and the field "IDENTIFIER" can be at any possition on this line,
The line can containt a variable number of field, not alway the same depending of the header file i use
... (6 Replies)
Discussion started by: kykyboss023
6 Replies
6. Programming
I'm trying find and print a number after a specific user passed string in each line of a text file using C (as requested by the powers that be). I've pieced together enough to read the file, find the string and print the line it was found on but I’m not sure where to even start in terms of finding... (3 Replies)
Discussion started by: cgol
3 Replies
7. Shell Programming and Scripting
Hi
I have requirement to find nth occurrence in a file and capture data from with in lines (between lines)
Data in File.
<QUOTE>
<SESSION>
<ATTRIBUTE NAME='Parameter Filename' VALUE='file1.parm'/>
<ATTRIBUTE NAME='Service Name' VALUE='None'/>
</SESSION>
<SESSION>
<ATTRIBUTE... (6 Replies)
Discussion started by: tmalik79
6 Replies
8. Shell Programming and Scripting
I would like to print the number of records of 2 files, and divide the two numbers
awk '{print NR}' file1 > output1
awk '{print NR}' file2 > output2
paste output1 output2 > output
awl '{print $1/$2}' output > output_2
is there a faster way? (8 Replies)
Discussion started by: programmerc
8 Replies
9. Shell Programming and Scripting
I am working on a script to convert bank data to a csv file. I have the format done - columns etc. The final piece of the puzzle is to change the second field (after the R) of every line to reflect its' line number in the file. I am stumped. I can use awk on each line but need help looping through... (9 Replies)
Discussion started by: Melah Gindi
9 Replies
10. Shell Programming and Scripting
Hi,
I have a simple problem but i guess stupid enough to figure it out. i have thousands rows of data. and i need to find match patterns of two columns and print the number of rows. for example:
inputfile
abd abp 123
abc abc 325
ndc ndc 451
mjk lkj... (3 Replies)
Discussion started by: redse171
3 Replies
LEARN ABOUT SUSE
choptest
CHOPTEST(8C) CHOPTEST(8C)
NAME
choptest - HylaFAX page chopping test program
SYNOPSIS
/usr/sbin/choptest [ options ] input.tif
DESCRIPTION
choptest is a program for testing the page chopping support in the HylaFAX software (specifically, in the faxq(8C) program). choptest ana-
lyzes a TIFF/F (TIFF Class F) file with 1-D MH- or 2-D MR-encoded data and reports what the automatic page chopping logic would do if the
file were submitted for transmission. Options are provided for controlling whether choptest checks the last page or all pages of the docu-
ment, and what whitespace threshold to use in deciding if a page should be chopped.
OPTIONS
-a Chop all pages in the document. This is equivalent to setting the PageChop configuration parameter to ``all''; c.f. hylafax-
config(5F). By default only the last page of the document is considered.
-t inches Set the minimum whitespace threshold that must be present on a page for it to be chopped. This is equivalent to the Page-
ChopThreshold configuration parameter; c.f. hylafax-config(5F). By default choptest requires that at least 3 inches of trailing
whitespace be present.
EXAMPLES
The following shows a multi-page, high-resolution document. Each page has insufficient whitespace for it to be chopped.
hyla% ./choptest -a ~/tiff/pics/faxix.tif
Chop pages with >=3" of white space at the bottom.
Don't chop, found 67 rows, need 588 rows
Don't chop, found 67 rows, need 588 rows
Don't chop, found 67 rows, need 588 rows
Don't chop, found 53 rows, need 588 rows
Don't chop, found 91 rows, need 588 rows
Don't chop, found 99 rows, need 588 rows
Don't chop, found 47 rows, need 588 rows
SEE ALSO
faxq(8C), hylafax-config(5F)
October 3, 1995 CHOPTEST(8C)