Include information in certain columns using grep and awk
HI all,
I have data in a file that looks like this:
I need to use 'awk' to include some information in the second column of those lines which have 'N*' in the 4th column.
Is there an easy 'grep' that will allow me to do this?
The desired result is the following:
Thank you in advance for assitance.
hi,
say I have
dirA/file1
dirB/file2
and I tar them up, and then do
zcat Tar.tar | tar tvf -
Sometimes I will see:
dirA/
dirA/file1
dirB/
dirB/file2
yet other times I will see (4 Replies)
I have several files with say something like
cat
sparrow
I can grep for "cat" and "sparrow" and usually the output is one below the other
cat
sparrow
How can I view these as columns say
Pets Birds
cat sparrow
Would be great if this can be on command line using awk or... (1 Reply)
Hi,
I'm working with gawk (on DOS) today.
A goal is: find a string for-instance '123', cut a line in two columns and write second one. The problem is: command line works OK, awk file doesn't. But I would like to work with file because there are many strings to find.
input:
line command:
awk... (4 Replies)
Hey,
Need some help for command to print only lines with two columns in a file
abc 111
cde 222
fgh
ijk 2
klm 12 23
nop
want the ouput to be
abc 111
cde 222
ijk 2
Thanks a lot in advance!!! (3 Replies)
Hi,
TASK 1:
I have been using this code to print the information of files kept at "/castor/cern.ch/user/s/sudha/forPooja" in some text file name FILE.txt.
rfdir /castor/cern.ch/user/s/sudha/forPooja | grep data | awk '{print "rfio:///castor/cern.ch/user/s/sudha/forPooja/"$9}' > FILE.txt
... (6 Replies)
Hi,
I have a input file with many records as below:
1J4RR4GG0BC508200 68646 1 N M
i want my output file to be like with columns included dgismdh and timestamp :
Example:
1J4RR4GG0BC508200 68646 1 N M dgismdh 2012-02-21 07:22:25.98591
How to do it.can we do using awk?
Pls help. (6 Replies)
I need to change the order of the columns of data that looks like this:
The original data is in 6 tab-separated columns.
FACTSHEET factsheet NN 1 5 DEP
WHAT what WP 2 3 SBJ
IS be VBZ 3 1 NMOD
AIDS AIDS NP ... (1 Reply)
Hi all, I have a query that runs that outputs data in the following format -
01/09/12 11:43:40,ADMIN,4,77,Application Group Load: Name(TESTED) LoadId(5137-1-0-1XX-15343-15343) File(/dir/dir/File.T03.CI2.RYR.2012009.11433350806.ARD) InputSize(5344) OutputSize(1359) Rows(2) Time(1.9960)... (8 Replies)
Discussion started by: jeffs42885
8 Replies
LEARN ABOUT MINIX
ppmtosixel
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)