Hello,
Our group is just starting to get into UNIX here. We are former REXX users on a VM Mainframe. Can someone point me to the documentation to read a file and write a file in a Unix Shell Script or does this have to be done in another language?
Thank you in advance...
Dave (3 Replies)
I have a zipped file that is ~ 10GB. I tried tarring it off to a tape, but I receive:
tar: <filename> too large to archive. Use E function modifier.
The file is stored on a UFS mount, so I was unable to use ufsdump.
What other options do I have? (I don't have a local file system large... (3 Replies)
Hey Guys,
I was wondering if someone would give me a hand with an issue I'm having, let me explain the situation:
I have a file that is constantly being written to and read from with updated lines:
# cat activity.file
activity1
activity2
activity3
activity4
activity5
This file... (2 Replies)
Is there a command in shell-script that I can use that copies a string or writes it to many files? Say I have files a, b and c and I want to copy or write the text "Hallo, I am a newbie!" to all these files? I know I can do echo "Hallo, I am a newbie!" > a but this only copies it to one file. How... (2 Replies)
Hello:
I have the following code:
----------------------------------
open (OUTPUT_FILE, ">>/usr/users/rovolis/PREPAID/CC/TCG/PP.$cyear$cmonth$cday.txt")||die "$!";
82 open (OUTPUT_FILE2, ">>/usr/users/rovolis/PREPAID/CC/TCG/PR.$cyear$cmonth$cday.txt")||die "$!";
83 # ... (0 Replies)
i've always been of the mind that having to write to disk is very sloppy and dirty. i personally hate this.
so i wonder, is there a way to have a shell script/program write to memory and access whatever it has in memory whenever it wants. pretty much treat memory like hard disk.
can... (2 Replies)
I'm trying to understand the difference between o_direct flag of open system call and dax (direct access) with ext4 filesystem.
According to my understanding both bypass page cache.
But I'm still unclear about the crucial difference between these 2 techniques. If there is a huge difference... (1 Reply)
Discussion started by: BHASKAR JUPUDI
1 Replies
LEARN ABOUT SUSE
libnetpbm
Libnetpbm manual(3) Library Functions Manual Libnetpbm manual(3)NAME
libnetpbm - general introduction to the netpbm library
DESCRIPTION
libnetpbm is a C programming library for reading, writing, and manipulating Netpbm images. It also contains a few general graphics manipu-
lation tools, but it is not intended to be a graphics tools library. For graphics tools, Netpbm expects you to run the Netpbm programs.
From a C program, the libnetpbm function pm_system() makes this easy. However, since it creates a process and execs a program, this may be
too heavyweight for some applications.
To use libnetpbm services in your C program, #include the pam.h interface header file. For historical reasons, you can also get by in some
cases with pbm.h, pgm.h, ppm.h, or pnm.h, but there's really no point to that anymore.
The libnetpbm functions are divided into these categories:
o PBM functions. These have names that start with pbm and work only on PBM images.
o PGM functions. These have names that start with pgm and work only on PGM images.
o PPM functions. These have names that start with ppm and work only on PPM images.
o PNM functions. These have names that start with pnm and work on PBM, PGM, and PPM images.
o PAM functions. These also have names that start with pnm and work on all the Netpbm image types.
o PM functions. These are utility functions that aren't specific to any particular image format.
For new programming, you rarely need to concern yourself with the PBM, PGM, PPM, and PNM functions, because the newer PAM functions do the
same thing and are easier to use. For certain processing of bi-level images, the PBM functions are significantly more efficient, though.
libnetpbm has a backward compatibility feature that means a function designed to read one format can read some others too, converting on
the fly. In particular, a function that reads a PGM image will also read a PBM image, but converts it as it reads it so that for program-
ming purposes, it is a PGM image. Similarly, a function that reads PPM can read PBM and PGM as well. And a function that reads PBM, PGM,
or PPM can read a PAM that has an equivalent tuple type.
For each of the five classes of libnetpbm image processing functions, libnetpbm has in in-memory representation for a pixel, a row, and a
whole image. Do not confuse this format with the actual image format, as you would see in a file. The libnetpbm in-memory format is
designed to make programming very easy. It is sometimes extremely inefficient, even more than the actual image format. For example, a
pixel that a PPM image represents with 3 bytes, libnetpbm's PAM functions represent with 16 bytes. A pixel in a PBM image is represented
by a single bit, but the PNM functions represent that pixel in memory with 96 bits.
See LibnetpbmUser'sManual(3)
for the basics on using libnetpbm in a program.
You can look up the reference information for a particular function in ThelibnetpbmDirectory(1)
Before Netpbm release 10 (June 2002), this library was split into four: libpbm, libpgm, libppm, and libpnm. That's largely the reason for
the multiple sets of functions and scattered documentation.
netpbm documentation December 2003 Libnetpbm manual(3)