03-07-2007
adding order number in the output file
Hello,
I have a list of all order number like below:
maryu01001
johnm00003
peter02234
catmy66751
For the above, all number must in 5 digits and I need to add one into the number and output a new list like below:
maryu01002
johnm00004
peter02235
catmy66752
How can write a simple script to read input file and output a new one?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can someone please help.
I need to add a sequence number to the start of each line of a file.
It needs to be 6 characters long. ie 000001 next line starts 000002 etc. (4 Replies)
Discussion started by: Dolph
4 Replies
2. Shell Programming and Scripting
What should be the Shell script that counts a number of unique word contained in a file and print them in alphabetical order line by line? (7 Replies)
Discussion started by: proactiveaditya
7 Replies
3. Shell Programming and Scripting
I have a file name -HRCFTSIN05PLA1602100430444444
my requirement is to split the file in 10000 count each file and to add sequence number.rch at the end of each file.
output should be in this format
HRCFTSIN05PLA160210043044444401.rch
HRCFTSIN05PLA160210043044444402.rch... (4 Replies)
Discussion started by: abhigrkist
4 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I need to create a script which checks for a particular file for eg.kumar1.txt.
If kumar1.txt is already exist the script should increment the file name as kumar2.txt and so on.
Please Advise.
Thanks & Regards,
Kumar66 (2 Replies)
Discussion started by: kumar66
2 Replies
5. Shell Programming and Scripting
Hi ,
I have a file which has a line starts with $segment_name and has the below data
source data
$Segment_Name = 123.ABC.123.01.txt
$Segment_Name = 123.ABC.ABC.txt
$Segment_Name = 123.ABC.12A3.txtMy target data should be
$Segment_Name = 123.ABC.123.01.txt
$Segment_Name =... (2 Replies)
Discussion started by: shruthidwh
2 Replies
6. Shell Programming and Scripting
I have a text file that has data like:
Data "12345#22"
Fred
ID 12345
Age 45
Wilma
Dino
Data "123#22"
Tarzan
ID 123
Age 33
Jane
I need to figure out a way of adding 1,000,000 to the specific lines (always same format) in the file, so it becomes:
Data "1012345#22"
Fred
ID... (16 Replies)
Discussion started by: say170
16 Replies
7. Shell Programming and Scripting
Given a file like this:
abc
def
ghi
I need to get to
somestandardtext abc1 morestandardtext
somestandardtext def2 morestandardtext
somestandardtext ghi3 morestandardtext
Notice that in addition to the standard text there is the line number added in as well. What I conceived is... (4 Replies)
Discussion started by: edstevens
4 Replies
8. Shell Programming and Scripting
Hi all,
I have 20 files (file001.txt upto file020.txt) and I want to read them from 3rd line upto end of file (line 1002). But in the final file they should appear to start from line 1.
I need following kind of output in a single file:
Filename Line number 2ndcolumn 4thcolumn
I... (14 Replies)
Discussion started by: bioinfo
14 Replies
9. Shell Programming and Scripting
Hi All ,
I have a file which contains data(comma separated) in below format :
500,Sourav ,kolkata ,8745775020,700091
505,ram,delhi ,9875645874,600032
510 ,madhu ,mumbai ,5698756430 ,500042
515 ,ramesh ,blore ,8769045601 ,400092
I want to add unique sequence number at the start of each... (7 Replies)
Discussion started by: STCET22
7 Replies
10. Shell Programming and Scripting
Hi all - I'm completely stumped by a script I'm working on...
The short version is I have a file called 'lookup' and in it are hundreds of names (first and last). I have a script that basically allows the user to enter a name, and what I need to have happen is something like this:
Record... (8 Replies)
Discussion started by: sabster
8 Replies
PCP(9.1) PCP(9.1)
NAME
pcp - copy pictures
SYNOPSIS
fb/pcp [ -wx0 y0 x1 y1 ] [ -ox y ] [ -ttype ] [ -cchannels ] [ -Cchannels ] [ -mcolormap ] [ -M ] [ input [ output ] ]
DESCRIPTION
Pcp copies the input picture (default standard input) to the output file (default standard output). Options control the attributes and
content of the output picture.
-w x0 y0 x1 y1
causes only the given window of the input picture to be copied. By default the whole picture is copied.
-o x y causes the output picture's WINDOW= attribute to be translated by adding (x,y) to the input window coordinates.
-t type
sets the TYPE= attribute of the output file. The default is to use the input file's type.
-c channels
causes only the given channels of the input picture to be copied. The default is to copy all channels. If channels not present in
the input picture are specified, they are computed in the ``most plausible'' way. For example, a missing alpha channel is set to
255, and an m channel will be synthesized from rgb channels by computing NTSC luminance. A 0 in channels causes a zero channel to
be written.
-C channels
sets the output CHAN= attribute. Channels must be the same length as the selected channels of the input picture.
-m colormap
attaches the given color map to the output.
-M elides the color map from the output.
SOURCE
/sys/src/fb/pcp.c
SEE ALSO
picfile(9.6), cmap(9.6)
PCP(9.1)