06-24-2013
Well then your requirements should be as clear as possible as I cant make much out of what you have now...so post what you want in as simple words as possible along with a sample of the input(s) and output(s)...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how can i use two or multiple statements in the if part
of an awk code
for example
i want to check two flag if they are true i will write some print
operations and increase the counter.
here is the c version of the code that i want to write:
counter=0;
if (flag1==1 && flag2==0) {... (7 Replies)
Discussion started by: gfhgfnhhn
7 Replies
2. Shell Programming and Scripting
Hi,
Despite reading the Conditional Statements chapter in the O'Reilly Sed & Awk book several times and looking at numerous examples, I cannot for the life of me get any kind of if ... else statement to work in my awk scripts! My scripts work perfectly (as they are written at least) and do what... (4 Replies)
Discussion started by: jonathanm
4 Replies
3. Shell Programming and Scripting
Hello,
I'm a shell scripting noob and new to this forum as well. My question is can nested if statements be done with && and || instead and if it can be done can someone provide an example pls.
Thanks in advance for the help (1 Reply)
Discussion started by: zomgshellscript
1 Replies
4. UNIX for Dummies Questions & Answers
I'm converting some code from ksh on my macbook (Version M 1993-12-28 s+) to an older solaris machine with ksh 88.
I can't seem to figure out this line, it worked on the new shell version.
set -A combo -- $(for x in ${ImageIDs};
do
nawk -v s=$x 'if($2 == s) getline ; getline if ($1 ==... (2 Replies)
Discussion started by: nerdcurious
2 Replies
5. Shell Programming and Scripting
Hello all,
I am writing up an input file and I was hoping I could get some guidance as to how to best consolidate these 2 awk statements for 1 while loop.
Here's my input file
# cat databases.lst
#NOTE: These entries are delimited by tabs "\t"
#oracleSID name/pass
#
db11 ... (2 Replies)
Discussion started by: Keepcase
2 Replies
6. Shell Programming and Scripting
I cannot get the code below to work correctly. The IF statement works just fine, but not the looping. The inner loop tries to find files for a given vendor; if found, I need to sleep giving another process time to move the files. Once the given vendor's files are gone, then I want to move on to the... (1 Reply)
Discussion started by: dgreene
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have the following two awk statements which I'd like to consolidate into one by piping the output from the first into the second awk statement (rather than having to write kat.txt out to a file and then reading back in).
awk 'BEGIN {FS=OFS=" "} {printf("%s ", $2);for (x=7; x<=10;... (3 Replies)
Discussion started by: kasan0
3 Replies
8. Shell Programming and Scripting
i have a datafile that has several lines that look like this:
2,dataflow,Sun Mar 17 16:50:01 2013,1363539001,2990,excelsheet,660,mortar,660,4
using the following command:
awk -F, '{$3=strftime("%a %b %d %T %Y,%s",$3)}1' OFS=, $DATAFILE | egrep -v "\-OLDISSUES," | ${AWK} "/${MONTH} ${DAY}... (7 Replies)
Discussion started by: SkySmart
7 Replies
9. Shell Programming and Scripting
Hi
What is the right structure to use awk with multiple If statements
The following code doesn't work
#
awk '
{
A = $1
}
END {
for ( i = 1; i <= c; i++ )
{
if ( A == 236 && A ==199... (7 Replies)
Discussion started by: khaled79
7 Replies
10. Shell Programming and Scripting
Hi everyone!
I'm having difficulties setting up a complex script with nested if statements while doing some word extracts, any help is appreciated.
Scenario:
1- Check if the file.txt has the word BINGO
2- If so then get the available number (any number) in the line that contains the word... (8 Replies)
Discussion started by: demmel
8 Replies
LEARN ABOUT PHP
tiffcheck
TIFFCHECK(8) System Manager's Manual TIFFCHECK(8)
NAME
tiffcheck - check TIFF for HylaFAX conversion requirements
SYNOPSIS
/usr/sbin/tiffcheck [ options ] file.tif
DESCRIPTION
tiffcheck takes TIFF input and writes a multi-line text message to the standard output describing any work needed to prepare the images for
facsimile transmission. tiffcheck is usually invoked by tiff2fax(8) script that is used by the HylaFAX scheduler to prepare TIFF documents
submitted for transmission.
The first line of output is a series of ``+''-separated words that indicate if the input file should be:
o rejected (``REJECT''),
o reformatted with a different data-encoding scheme (``REFORMAT''),
o scaled to different page dimensions (``RESIZE''),
o reimaged in a different vertical resolution (``REVRES''), or
o reimaged for other reasons such as conversion from color to black&white (``REIMAGE'').
The conversion requirements string will always have keywords in the above order; e.g. ``RESIZE+REVRES'' if the input file needs to be
scaled and converted to a different resolution. Information following the first line is descriptive text that explains the reason(s) for
the file conversion(s); this text is suitable for return to a client (should document conversion fail or not be attempted). The descrip-
tive text is ordered identically to the keywords in the conversion string; this makes it possible to match up conversion requirements to
reasons.
OPTIONS
The following operations are recognized:
-1 Set output to be Group 3 1D-encoded.
-2 Set output to be Group 3 2D-encoded.
-3 Set output to be Group 4 MMR-encoded.
-w width Set the output page width, in pixels. By default, pages are 1728 pixels wide.
-l length Set the output page length in millimeters. By default, pages are 297 millimeters long.
-r vres Set the vertical resolution, in lines/inch, at which to image the TIFF.
EXAMPLES
The following color image needs to be converted to black&white, resized to the output page dimensions, and reformatted to use Group 3 1D-
encoded data.
hyla% /usr/sbin/tiffcheck jello.tif
REFORMAT+RESIZE+REIMAGE
Document is not a bilevel image (bits/sample 8).
Document requires reformatting, not in Group 3 format.
Document requires resizing to adjust page width (convert to 1728, document is 256).
This image is a facsimile received at high resolution (196 lpi); it only needs to be converted to 98 lpi.
hyla% /usr/sbin/tiffcheck faxix.tif
REVRES
Document requires reformatting to adjust vertical resolution (convert to 98, document is 196).
SEE ALSO
tiff2fax(8), faxq(8), hylafax-server(5)
January 18, 1996 TIFFCHECK(8)