Hi
I have a file which looks like this
#HEllo
#How....
#version 1.0.1
#Author aaaaa
ab.-.1.-.90.-.80.-..-.OK
cd.-.8.-.91.-.800.-.xy.-..-.
the separator is .-. (dot hyphen dot)
I want to display this as columns like
ab cd
1 8
90 91 (1 Reply)
Hi
I need to check if field separator I am using in awk statement is " : ", for example:
TIME=12:59
HOUR=`echo "$TIME" | awk '{FS=":"; print $1}'`
MINUTES=`echo "$TIME" | awk '{FS=":"; print $2}'`
Is there a way to check within the above awk statement ?
Thanks for help -A (2 Replies)
Hi,
I am using UBUNTU 12.04.
I have a dataset as follows:
Column#1 Column#2 Column#3 .... Column#50
1 154878
1 145145
2 189565
2 454121
... (5 Replies)
I need to set awk field separator to ";", but I need to avoid ";EXT".
so that
echo a;b;c;EXTd;e;f | awk -F";" '{print $3}'
would give "c;EXTd" (2 Replies)
suppose i have a bash script:
#!/bin/bash
echo "hello"
echo "how are you"
echo "today"
how can i put the entire script above into a basic c program?
i do not want to translate the bash code to a c code. i want C to run the bash code. is this possible?
i found this on the... (15 Replies)
Hi Experts ,
file :
- How to construct the awk filed separator so that $1, $2 $3 , can be assigned to the each "" range.
I am trying : awk -F"]" '{print $1}'
but it is printing the entire file. Not first field.
The desired output needed for first field... (9 Replies)
I can not figure out how to set the Output filed separator in awk when using printf.
Example:
cat file
some data
here_is_more information
Requested output
some------------data
her_is_more-----information
Here are some that does not work:
awk '{printf "%-15s %s\n",$1,$2}' OFS="-" file... (9 Replies)
Hello to all,
Please some help on this. I have the file in format as below.
How can I set the record separator as the string below in red
"No. Time Source Destination Protocol Length Info"
I've tried code below but it doesn't seem to... (6 Replies)
Friends have the following code that is correct.
BEGIN { num_reg = 0
suma_iva=0
}
{
num_reg++
suma_iva=suma_iva+int(substr($0, 103,9))
}
END{
printf ("%011d",suma_iva)
}
I have the following problem, I have to do just that but this time... (4 Replies)
Discussion started by: tricampeon81
4 Replies
LEARN ABOUT V7
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)