Hi all,
I am new to UNIX, so sorry if my question seem stupid to u.
well i want to replace the first character of first 30 lines of a file, only if the first character is h.
and
in anothe script i want to replace a particular string/character say hello/h of a file.Condition: It should... (1 Reply)
// AIX 5.3
I am trying to use .sh after changing it to .ksh
Obviously, it doesn't like the file extension change.
I am seeing a lot of odd characters (^M) like below:
Init_Part2 ()^M^M
{^M^M
AWTRACE "AW SET"^M^M
set | grep -e CFG_ -e OUTDIR_ENV^M^M
AWTRACE "AW SET"^M^M
^M^M
if ;... (2 Replies)
Sorry to bug you, but my sed is failing me,
I have a file auto generated from abinitio, it has a string of chars ending with a line break, and then it has added a ^A character, I can remove this is vi by using the following %s/^A//g (where ^A is ctrl v and control A), however when I try to sed... (1 Reply)
i want to print ODD lines like first ,third then fifth and so on
234,567,ABC,KJL
234,565,ABD,KJL
234,568,ABE,KJL
234,560,ABF,KJL
234,563,ABG,KJL
234,562,ABH,KJL
O/P will be like
234,567,ABC,KJL ----->first liine
234,568,ABE,KJL ----->third line
234,563,ABG,KJL ----->fifth line... (6 Replies)
how to delete/replace the the odd occurance of a pattern say newline character "\n"
a,b,c,d
e,f
g, h, i, j, k, l
m,n
1, 2, 3, 4,
5, 6
1, 3, 4, 5, 6, 7
the output should be
a,b,c,de,f
g, h, i, j, k, lm,n
1, 2, 3, 4,5, 6
1, 3, 4, 5, 6, 7 (4 Replies)
Hi friends,
I am looking for sed command/script that would search for a given fixed pattern on odd lines and then if it matches, prints the matching pattern and the next line. For example, in the example below, i am looking for pattern 0 and 1011 on odd lines.
########## start of example file... (10 Replies)
Hello people,
I am trying with sed to insert some text at the beginning of each odd line of a file but no luck. Can you please help. Awk is also suitable but I am not very familiar with it.
Thank you in advance for any help. (7 Replies)
This is for AIX 6.1, I've a flat file and the format is like this
DECLARE
some statements;
BEGIN
some statements;
END;
I've to search BEGIN and replace it with the following 4 lines
BEGIN
For x in 1..1
LOOP
BEGIN
Similarly I've to search END and replace it with the... (7 Replies)
Discussion started by: Mukul Sharma
7 Replies
LEARN ABOUT V7
ppmtopcx
ppmtopcx(1) General Commands Manual ppmtopcx(1)NAME
ppmtopcx - convert a portable pixmap into a PCX file
SYNOPSIS
ppmtopcx [-24bit] [-packed] [-xpos=cols] [-ypos=rows] [ppmfile]
DESCRIPTION
Reads a PPM image as input. Produces a PCX file as output. The type of the PCX file depends on the number of colors in the pixmap:
16 colors or less:
1 bit/pixel, 1-4 planes.
256 colors or less:
8 bits/pixel, 1 plane, colormap at the end of the file.
More than 256 colors:
24bit truecolor file (8 bits/pixel, 3 planes).
OPTIONS -24bit Produce a 24bit truecolor file, even if the pixmap has 256 colors or less.
-packed
Use "packed pixel" format for files with 16 colors or less: 1, 2, or 4 bits/pixel, 1 plane.
-xpos=cols
-ypos=rows
These options set the position of the image in some field (e.g. on a screen) in columns to the right of the left edge and rows below
the top edge. The PCX format contains image position information. Don't confuse this with the position of an area of interest
within the image. For example, using pnmpad to add a 10 pixel left border to an image and then converting that image to PCX with
xpos = 0 is not the same as converting the original image to PCX and setting xpos = 10.
The values may be from -32767 to 32768.
The default for each is zero.
SEE ALSO pcxtoppm(1), ppm(5)AUTHORS
Copyright (C) 1994 by Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
Based on previous work by Michael Davidson.
12 December 1994 ppmtopcx(1)