12-19-2005
adjust files
hi...
i have a big problem, and i don't know how to solve it.
here is the thing: i have 12 files, which are flat files, with several records(lines), and each record has 3 fields, wich are separated by pipe (|), something like this:
file 1:
33|12|2000
33|22|3000
66|24|3000
99|48|4000
104|50|5000
...
file n :
33|20|1000
104|20|2000
300|20|2000
the first field is a code, wich i can access it in another file. the thing is: i would like join them in one file, order by code. Something like this:
33|12|2000|20|1000
33|22|3000
66|24|3000
99|48|4000
104|50|5000|20|2000
300|20|2000
is that possible?
any idea, thanks
9 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
I have a doubt with an error message, and i want to be sure if this is a normal situation or not.
Situation: I was formating and installing a SCSI 36Gb HD with UNIX SCO 5.05, the problem happens when is making the division and filesystem on disk 1, and the message error is "Exit value 139... (1 Reply)
Discussion started by: jav_v
1 Replies
2. Shell Programming and Scripting
Enclosing a script that is used everyday for database shutdown. In here you will find some code that checks oracle version.
That part is very unnecessary since we use only 8.1.7 and will never go back.. Can anyone help me by modifying the code, to
never use that part and readjust so script does... (1 Reply)
Discussion started by: ST2000
1 Replies
3. UNIX for Advanced & Expert Users
Hi all...
i have a question, and i don`t know what to do ... i have a flat file what is separated by ";" and i need format it... here is an example:
this is what i have:
AAA ; BBB ; 1 ; 1.1 ; 1.2 ; 1.3 ; 2 ; 2.1 ; 2.2 ; 2.3 ; 3 ; 3.1 ; 3.2 ; 3.3 ; .......
.........
there are a lot of... (4 Replies)
Discussion started by: DebianJ
4 Replies
4. Shell Programming and Scripting
Is there a way to adjust spacing of a line using k shell?
e.g I have a file below
$ cat file1
AAA BBB CCC
A B C
AAAA BB CC
I want each word to be adjusted with spaces to have 10 character length like below:
AAA BBB CCC
A B C
AAAA BB CC
Any... (4 Replies)
Discussion started by: stevefox
4 Replies
5. OS X (Apple)
I'm using my wife's Macbook, and I just noticed that her screen is off axis, but I can't find a way to adjust it. I've tried playing around with resolution in preferences, but nothing.
Maybe a terminal command for adjusting the x and y values of the screen?
Any and all suggestions welcomed :) (2 Replies)
Discussion started by: andou
2 Replies
6. Shell Programming and Scripting
Hello, Newbie question on scripting - I'm looking to create a simple script that will work on RHEL5 that will adjust the network settings: ip address, default gateway, and subnet mask. If anything else needs to be done (service network stop / start) or should be done to make settings active - I... (4 Replies)
Discussion started by: rojizo
4 Replies
7. Shell Programming and Scripting
Hello everyone,
I am trying to write a script that will accomplish the following:
- query current system time and store result into a variable
- wait for some amount of time, say 300 seconds
- reset system time to earlier queried time + 1 second
I did some basic shell scripting (CSH... (11 Replies)
Discussion started by: xaiu
11 Replies
8. Solaris
Hi experts,
I m new to solaris. I am getting following errror in /var/adm/messages file on
one of the solaris 10 zones -
xntpd: Can't set time of day: Not owner
xntpd daemon is online.
Any help on this ? (3 Replies)
Discussion started by: sunadmin
3 Replies
9. Shell Programming and Scripting
in example.txt file is below
ADD PDU:SRN=0,PDUID=LOCAL,NAME="PDU_0",PSV=LOW,MOG="PUBLIC",REFERABLE=YES;
ADD PDU:SRN=2,PDUID=LOCAL,NAME="PDU_1",PSV=LOW,MOG="PUBLIC",REFERABLE=YES;
ADD MODULE:MID=84,MT=DSU,SRN1=0,SN1=4,MNAME="DSU84";
ADD MODULE:MID=85,MT=DSU,SRN1=0,SN1=4,MNAME="DSU85";
How to... (2 Replies)
Discussion started by: swensens
2 Replies
LEARN ABOUT MINIX
ppmquantall
ppmquantall(1) General Commands Manual ppmquantall(1)
NAME
ppmquantall - run ppmquant on a bunch of files all at once, so they share a common colormap
SYNOPSIS
ppmquantall [-ext extension] ncolors ppmfile ...
DESCRIPTION
Takes a bunch of portable pixmap as input. Chooses ncolors colors to best represent all of the images, maps the existing colors to the new
ones, and overwrites the input files with the new quantized versions.
If you don't want to overwrite your input files, use the -ext option. The output files are then named the same as the input files, plus a
period and the extension text you specify.
Verbose explanation: Let's say you've got a dozen pixmaps that you want to display on the screen all at the same time. Your screen can
only display 256 different colors, but the pixmaps have a total of a thousand or so different colors. For a single pixmap you solve this
problem with ppmquant; this script solves it for multiple pixmaps. All it does is concatenate them together into one big pixmap, run
ppmquant on that, and then split it up into little pixmaps again.
(Note that another way to solve this problem is to pre-select a set of colors and then use ppmquant's -map option to separately quantize
each pixmap to that set.)
SEE ALSO
ppmquant(1), ppm(5)
AUTHOR
Copyright (C) 1991 by Jef Poskanzer.
27 July 1990 ppmquantall(1)