This can be done only using shell built-ins (except for the ls and mv commands). Note that it uses a reverse order ls to move the highest numbered files first in case moving a lowered numbered file might overwrite a higher numbered file if they were renumbered in order.
It defaults to adding 30 to each file number. If you invoke this script with one operand, it will use that operand as the offset instead of the default.
If this script correctly prints the mv commands you want, remove the echo shown in red and rerun it to actually rename the files.
This User Gave Thanks to Don Cragun For This Post:
Hello all,
I am trying to add chunks to my informix dataspace. I have one dataspace ( the rootdbs ) and the new chunk is a raw device. Precisely slice1 on my new external harddisk.
The question is, what should be the offset value. The document says, the offset is used by the engine to... (1 Reply)
Hi All,
I need to extract only XML details from large log file which may contain other unwanted junk details.
For example, our xml will be start as <OUTBOUND_MESSAGE .....> and ends with </OUTBOUND_MESSAGE>. I want to extract only lines between these start and end tag (Including these tags)... (5 Replies)
Hi,
I want to read a file from a specified offset from the start of file. With the read command, is it possible to do so. Please suggest. Is there any other alternative?
Thanks,
Saurabh (2 Replies)
Function: int fcntl(int fd, int cmd, struct flock * lock)
Data Type: struct flock
This structure is used with the fcntl function to describe a file lock. It has these members:
off_t l_start
This specifies the offset of the start of the region to which the lock applies, and... (1 Reply)
I have a lot of very large hex files that I need to change one value at the same offset and save to another file. I have a script that finds each file and just need to put an operator for each file.
I think sed might be able to do this but I have not used it before and would like some help. If... (8 Replies)
Hi,
I'm looking for a way (other than C) to pull out a number of bytes in a Linux file for a giving length. for example:
file1 contains 2 records:
abcdefghijkl
mnopqrstuv
.....
so, I want to pull starting in byte 9 for a length of 8
file2 would contain:
ijkmnopq
Thanks (2 Replies)
I have read the below from the book bash cookbook.Tail +1 filenames is similar to cat filename
I have tried the same in Ubuntu 11.10 with bash. 4.0 .
I have received error for the Same.
May I know in which system that will work fine ?
Thanks (1 Reply)
Hi ,
I have a .gz file whose contents look like below.
data1^filename1
data2^filename2.
..
.
.
Is it possible to find out the byte offset of each record from the .gz file.
Like in an uncompressed file.
grep -nb "Filename" give the byte offset of the record in this case.
... (4 Replies)
Hi,
I am trying to get the position of a repeated string in a line using
grep -b -o "pattern"
In my server I am using GNU grep version 2.14 and the code is working fine. However when I am deploying the same code in a different server which is using GNU grep version 2.5.1 the code is not... (3 Replies)
Discussion started by: Subhamoy
3 Replies
LEARN ABOUT SUNOS
postplot
postplot(1) User Commands postplot(1)NAME
postplot - PostScript translator for plot(4B) graphics files
SYNOPSIS
postplot [-c num] [-f name] [-m num] [-n num] [-o list] [-p mode] [-w num] [-x num] [-y num] [filename...]
/usr/lib/lp/postscript/postplot
DESCRIPTION
The postplot filter translates plot(1B) graphics filenames into PostScript and writes the results on the standard output. If no filenames
are specified, or if - is one of the input filenames, the standard input is read.
OPTIONS
The following options are supported:
-c num Print num copies of each page. By default, only one copy is printed.
-f name Print text using font name. Any PostScript font can be used, although the best results will be obtained only with constant width
fonts. The default font is Courier.
-m num Magnify each logical page by the factor num. Pages are scaled uniformly about the origin which, by default, is located at the cen-
ter of each page. The default magnification is 1.0.
-n num Print num logical pages on each piece of paper, where num can be any positive integer. By default, num is set to 1.
-o list Print pages whose numbers are given in the comma-separated list. The list contains single numbers N and ranges N1 - N2. A missing
N1 means the lowest numbered page, a missing N2 means the highest.
-p mode Print filenames in either portrait or landscape mode. Only the first character of mode is significant. The default mode is land-
scape.
-w num Set the line width used for graphics to num points, where a point is approximately 1/72 of an inch. By default, num is set to 0
points, which forces lines to be one pixel wide.
-x num Translate the origin num inches along the positive x axis. The default coordinate system has the origin fixed at the center of the
page, with positive x to the right and positive y up the page. Positive num moves everything right. The default offset is 0.0
inches.
-y num Translate the origin num inches along the positive y axis. Positive num moves everything up the page. The default offset is 0.0.
OPERANDS
The following operand is supported:
filename The graphics filename to be translated
EXIT STATUS
The following exit value is returned:
0 filename(s) were successfully processed.
FILES
/usr/lib/lp/postscript/forms.ps
/usr/lib/lp/postscript/postplot.ps
/usr/lib/lp/postscript/ps.requests
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWlps |
+-----------------------------+-----------------------------+
SEE ALSO download(1), dpost(1), plot(1B), postdaisy(1), postdmd(1), postio(1), postmd(1), postprint(1), postreverse(1), plot(4B), attributes(5)NOTES
The default line width is too small for write-white print engines, such as the one used by the PS-2400.
SunOS 5.10 17 Jun 1992 postplot(1)