How to test many texts generated by many commands ?


 
Thread Tools Search this Thread
Top Forums Programming How to test many texts generated by many commands ?
# 8  
Old 10-24-2011
Quote:
Originally Posted by 915086731
The format of every file is similar
Smilie

How similar?

Try this:

Code:
#!/bin/sh

CELL1=`awk -v FS="  " -v R=5 C=17 'NR==(R+3) { print $C ; exit } file1'
CELL2=`awk -v FS="  " -v R=3 C=4 'NR==(R+3) { print $C ; exit } file2'

[ "$CELL1" = "$CELL2" ] || echo "Cells differ"

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Aligning Texts

is there any way to align my text so every column begins on the same line as the previous line? here's my command: printf "THEN ( ${SEARCHPATTB} = Hour = ${CALTOTB} ) %8s => %8s NOW ( ${SEARCHPATT} = Hour = ${CALTOT} ) %7s => %7s Reduced By: %7s -${RESULT}"\\n output i'm currently getting... (2 Replies)
Discussion started by: SkySmart
2 Replies

2. Shell Programming and Scripting

File test commands with variable file name

Hi there I have the following code SDFFILE_SRC=$BACKEND_DIR/$SDFFILE_MIN_tar SDFFILE_DST=$SIM_DIR/$SDFFILE_MIN if ] .... .... .... fi Simply I need to check if $SDFFILE_SRC isa newer than $SDFFILE_DST or $SDFFILE_DST does not exist then execute the IF Body. Although the the... (2 Replies)
Discussion started by: aelhosiny
2 Replies

3. Post Here to Contact Site Administrators and Moderators

Can there be alt-texts to icons?

Can you add hover texts (alt-texts) to icons? It is not always obvious what each of them mean just by looking at them. Sometimes it is clear from the url it points to, but for accessibility reasons alone it would be good to have alt-texts as a standard. (1 Reply)
Discussion started by: figaro
1 Replies

4. UNIX for Dummies Questions & Answers

Texts between 2 strings

Hi, I have a file with texts shown below, <2013 abc <2013 start request pdu dot1q end pdu response pdu dot1q end pdu am searching for the text "dot1q" , when it matches in the file , i need the contents between "<2013 start" and "end pdu". Can some one help on this ? ... (5 Replies)
Discussion started by: giri_luck
5 Replies

5. UNIX for Dummies Questions & Answers

How to test commands in files?

Hi. I'm new here, and I'm trying to enter this big world of unix. I would like to know how can I install a SSH server for free so I can teste some things, like make a file, change files, rename and things like this? If is there any easy way to test all commands it would be interesting too. ... (10 Replies)
Discussion started by: whity
10 Replies

6. Shell Programming and Scripting

How to concatenate texts in perl only?

Hi, I want to concatenate the texts in the file but there are different scenario's. Ist Scenario. The contents of file has id`language,sequence number,text,language Here id`language is a key pair to identify the correct language. Sequnce number is the order the text being inserted. Text... (3 Replies)
Discussion started by: vanitham
3 Replies

7. Shell Programming and Scripting

extract texts using awk

Hello, I have two files: File1: a b c d File2: b c e I need 'e' as output.... Thanks.. ---------- Post updated at 12:16 PM ---------- Previous update was at 12:15 PM ---------- (1 Reply)
Discussion started by: shekhar2010us
1 Replies

8. Shell Programming and Scripting

copy and merge texts between two pattern

I need 1. to find all the files from a Folder "folder_name" and from its 4 or 5 sub folders which contain a certain pattern "pattern1". 2. from these files copy and merge all the text between "pattern1" and another different pattern "pattern2" to "mergefile". 3. Get rid of every html tag. 4.... (3 Replies)
Discussion started by: mjomba
3 Replies

9. Shell Programming and Scripting

How to check weather a string is like test* or test* ot *test* in if condition

How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies

10. Shell Programming and Scripting

Test on string containing spacewhile test 1 -eq 1 do read a $a if test $a = quitC then break fi d

This is the code: while test 1 -eq 1 do read a $a if test $a = stop then break fi done I read a command on every loop an execute it. I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test. For example echo hello. Now the... (1 Reply)
Discussion started by: Max89
1 Replies
Login or Register to Ask a Question
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)