08-02-2008
Firstly, please create file below:
a 601 602 603
b 601
c 610 615
d 601 603 612
Secondary, please use "join" command:
a 601 601 602 603
a 602 601 602 603
a 603 601 602 603
b 601 601
c 610 610 615
c 615 610 615
d 601 601 603 612
d 603 601 603 612
d 612 601 603 612
Thirdly, please replace 1st word and 2nd word.
Forthly, please delete same word as 1st word.
It's my idea. One step is easy.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
Please help me to get the following from script for Unix ENvironment(shell, perl, tr, sed, awk).
INPUT FILE:
20K,ME,592971
20K,YOU,2
20K,HE,1244998
50K,YOU,480110
50K,ME,17
50K,HIS,10
50K,HE,1370391
OUTPUT FILE:
K,ME,YOU,HE,HIS
20K,592971,2,1244998,0... (5 Replies)
Discussion started by: ashis.tewari
5 Replies
2. Shell Programming and Scripting
Hi,
I have a shell script to unload all the empname who have salary >50000 from the emp table into a text file(empname.txt) .
m_db unload "$dbc_file" -column_delimiter ',' -select "SELECT empname FROM emp where salary > 50000" >> empname.txt
Now my text file have data in the following format ... (3 Replies)
Discussion started by: kavithakuttyk
3 Replies
3. Shell Programming and Scripting
Hi, I need to edit a file Protein Data Bank (pdb) and then open that file with the program VMD but when I edit the file with awk, it changes pdb format and the VMD program can not read it.
I need to subtract 34 to field 6 ($ 6).
this is a pdb file :
ATOM 918 N GLY B 103 -11.855 8.675... (8 Replies)
Discussion started by: bio_
8 Replies
4. Shell Programming and Scripting
Hi,
My file
cat a.txt
Sat Nov 27 00:02:00 2010
00:02:00 Usr 27: Login by edi on batch. (452)
00:02:09 Usr 27: Logout by on batch. (453)
00:02:09 Usr 27: Login by edi on batch. (452)
00:02:22 Usr 27: Logout by on batch. (453)
00:02:22 Usr 27: Login by edi on batch.... (3 Replies)
Discussion started by: ganeshanbu
3 Replies
5. UNIX for Dummies Questions & Answers
I have a bunch of files in various folders. I want to go through each of them and display certain lines in a particular format
All files have a similar format
Date:
Time:
User:
Message:
Miscellaneous:
(and some other stuff)I want to display to only the "Date:", "Time:" "User:" lines in... (7 Replies)
Discussion started by: newbiegal01
7 Replies
6. Shell Programming and Scripting
Hi...
I have an inputfile name as :- abc_test_20120213.dat (date in yyyymmdd format)
I need the output file name as abc_test_13022012.dat (date in ddmmyyyy format)
Please help me on this...
Thanks in advance. (5 Replies)
Discussion started by: gani_85
5 Replies
7. Shell Programming and Scripting
I have a CSV file with a date format like this;
11/19/2012 17:37:00,1.372,121.6
11/19/2012 17:38:00,0.743,121.6
Want to change the time stamp to seconds after 1970 so I can get the data in rrdtool. For anyone interested, this is data from a TED5000 unit and is Kwatts and volts.
Needs to... (3 Replies)
Discussion started by: ottsm
3 Replies
8. Shell Programming and Scripting
Hi Gurus,
I have some weird issue. when using
ls -l
the result shows different time format:
-rw-r--r-- 1 abc gourp1 3032605576 Jun 14 2013 abc
-rw-rw-r-- 1 abc gourp1 1689948832 Aug 10 06:22 abc
one display 2013 which is year; another one displays 06:22 which is time.
... (4 Replies)
Discussion started by: ken6503
4 Replies
9. Shell Programming and Scripting
Hi all,
I have a file that looks like this:
Closest words to: manifesto >>>>
Closest words to: passport >>>>
and I want to reformat this with awk with the following desired result:
manifesto
0.99999999999999978, 'manifesto'
0.72008211381623111, 'communiqu\xe9'... (5 Replies)
Discussion started by: owwow14
5 Replies
10. UNIX for Dummies Questions & Answers
Hello all,
I am tryign to change the format of files (which are many in numbers). They at present are named like this:
SomeProcess_M-130_100_1_3BR.root
SomeProcess_M-130_101_2_3BX.root
SomeProcess_M-130_103_3_3RY.root
SomeProcess_M-130_105_1_3GH.root
SomeProcess_M-130_99_1_3LF.root... (7 Replies)
Discussion started by: emily
7 Replies
LEARN ABOUT SUSE
cpu_model
cpu_model(3alleg4) Allegro manual cpu_model(3alleg4)
NAME
cpu_model - Contains the Intel CPU submodel. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
extern int cpu_model;
DESCRIPTION
Contains the CPU submodel, where applicable. Allegro defines at least the following CPU family types (see include/allegro/system.h for a
more complete list):
CPU_FAMILY_I586:
CPU_MODEL_PENTIUM, CPU_MODEL_K5, CPU_MODEL_K6
CPU_FAMILY_I686:
CPU_MODEL_PENTIUMPRO, CPU_MODEL_PENTIUMII,
CPU_MODEL_PENTIUMIIIKATMAI, CPU_MODEL_PENTIUMIIICOPPERMINE,
CPU_MODEL_ATHLON, CPU_MODEL_DURON
CPU_FAMILY_EXTENDED:
CPU_MODEL_PENTIUMIV, CPU_MODEL_XEON,
CPU_MODEL_ATHLON64, CPU_MODEL_OPTERON
CPU_FAMILY_POWERPC:
CPU_MODEL_POWERPC_x, for x=601-604, 620, 750, 7400, 7450
You can read this variable after you have called check_cpu() (which is automatically called by allegro_init()). Make sure you check the
cpu_family and cpu_vendor so you know which models make sense to check.
SEE ALSO
check_cpu(3alleg4), cpu_vendor(3alleg4), cpu_family(3alleg4), cpu_capabilities(3alleg4), allegro_init(3alleg4)
Allegro version 4.4.2 cpu_model(3alleg4)