02-12-2013
Combine two files using script
Hi
please help me to combine below two files into one file
file1
HTML Code:
10.238.54.1 enk-ras-bng-cse-01 10.10.10.10
10.238.56.225 ngp-ras-bng-cto-01 10.10.10.10
file2
HTML Code:
10.238.54.1 enk-ras-bng-cse-01 20.20.20.20
10.238.56.225 ngp-ras-bng-cto-01 20.20.20.20
Required output file
HTML Code:
10.238.54.1 enk-ras-bng-cse-01 10.10.10.10 20.20.20.20
10.238.56.225 ngp-ras-bng-cto-01 10.10.10.10 20.20.20.20
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i need to combine two file. These two files have the same line number, and i need to combine each corresponding line. I tried the paste, but i need coma as the delimeter. are there anyway to do it? thanks. (4 Replies)
Discussion started by: tao
4 Replies
2. UNIX for Dummies Questions & Answers
Some one plz give me the answer
we have 3 files 1 and 2 are given and we need to get 3 file by using some
trick
file_one.dat
AMITH
ARUN
ARVIND
file_two.dat (these are Variables)
X
Y
Z
and we need to write scirpt in file_two.data and
get the answer in file_three.dat as fallows... (2 Replies)
Discussion started by: Nekki
2 Replies
3. Shell Programming and Scripting
I need a script that combines files with the same name. These files are on a windows directory but the PC has Cygwin so i have a limited unix command set.
What I've got;
WebData_9_2007-09-20.txt
WebData_9_2007-09-20.txt
WebData_9_2007-09-21.txt
WebData_9_2007-09-20.txt... (4 Replies)
Discussion started by: jmwhitford
4 Replies
4. Shell Programming and Scripting
Hi All ,
Any one help me to combine two files in shell scripting .Below is my requrement
i have 2 files as follows
filea
newyork America
Texas America
london Engalad
Fileb
abc
def
xyz
i have to combine this file as follows
newyork America abc
Texas ... (1 Reply)
Discussion started by: ajmalc
1 Replies
5. Shell Programming and Scripting
I have multiple files; each file contains a certain data in a column view
simply i want to combine all those files into one file in columns
example
file1:
a
b
c
d
file 2:
1
2
3
4
file 3:
G (4 Replies)
Discussion started by: ahmedamro
4 Replies
6. UNIX for Dummies Questions & Answers
I need to combine two files based on the content in first column and combine it into one file . For example :
file1:
A 10
B 20
C 30
D 40
File2:
B 200
E 500
A 100
D 400
Need the output in this format:
file 3 :
column 1 Column 2 Column 3
A 10 100
B 20 ... (4 Replies)
Discussion started by: tsm2011
4 Replies
7. Shell Programming and Scripting
Hi,
i have two files. i want to combine records from these two files in below manner :-
first line from first file(1st line)
2nd line from 2nd file(1st line)
3rd line from 1st file(2nd line)
4th line from 2nd file(2nd line)
so on.... (1 Reply)
Discussion started by: deepakiniimt
1 Replies
8. Shell Programming and Scripting
How to cilnd desided output from file1 and file2 with awk.
file1
1 2
7 8 9
14 15 16
21 22 23
28 29 30
file2
aa bb cc
dd ee ff
gg hh ii jj
kk ll (3 Replies)
Discussion started by: theshashi
3 Replies
9. Shell Programming and Scripting
Hello All , I am new to this Forum,
I am trying to write a script to combine two data files with 1 column in common and others columns are different .
File1
Apple 29
tomatao 4
grapes 25
File2
Apple fruit
tomatao veg
grapes fruit
other (3 Replies)
Discussion started by: gagan0119
3 Replies
10. UNIX for Beginners Questions & Answers
i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies
LEARN ABOUT CENTOS
ras-mc-ctl
RAS-MC-CTL(8) RAS memory controller admin utility RAS-MC-CTL(8)
NAME
ras-mc-ctl - RAS memory controller admin utility
SYNOPSIS
ras-mc-ctl [OPTION]...
DESCRIPTION
The ras-mc-ctl program is a perl(1) script which performs some useful RAS administration tasks on EDAC (Error Detection and Correction)
drivers.
OPTIONS
--help Display a brief usage message.
--mainboard
Print mainboard vendor and model for this hardware, if available. The method used by ras-mc-ctl to obtain the mainboard vendor and
model information for the current system is described below in the MAINBOARD CONFIGURATION section.
--status
Print the status of EDAC drivers (loaded or unloaded).
--quiet
Be less verbose when executing an operation.
--register-labels
Register motherboard DIMM labels into EDAC driver sysfs files. This option uses the detected mainboard manufacturer and model num-
ber in combination with a "labels database" found in any of the files under /etc/ras/dimm_labels.d/* or in the labels.db file at
/etc/ras/dimm_labels.db. An entry for the current hardware must exist in the labels database for this option to do anything.
--print-labels
Display the configured labels for the current hardware, as well as the current labels registered with EDAC.
--guess-labels
Print DMI labels, when bank locator is available at the DMI table. It helps to fill the labels database at /etc/ras/dimm_labels.d/.
--labeldb=DB
Specify an alternate location for the labels database.
--delay=time
Specify a delay of ime seconds before registering dimm labels. Only meaninful if used together with --register-labels.
--layout
Prints the memory layout as detected by the EDAC driver. Useful to check if the EDAC driver is properly detecting the memory con-
troller architecture.
MAINBOARD CONFIGURATION
The ras-mc-ctl script uses the following method to determine the current system's mainboard vendor and model information:
1. If the config file /etc/edac/mainboard exists, then it is parsed by ras-mc-ctl. The mainboard config file has the following simple syn-
tax:
vendor = <mainboard vendor string>
model = <mainboard model string>
script = <script to gather mainboard information>
Where anything after a '#' character on a line is considered a comment. If the keyword script is specified, then that script or exe-
cutable is run by ras-mc-ctl to gather the mainboard vendor and model information. The script should write the resulting information on
stdout in the same format as the mainboard config file.
2. If no mainboard config file exists, then ras-mc-ctl will attempt to read DMI information from the sysfs files
/sys/class/dmi/id/board_vendor
/sys/class/dmi/id/board_name
3. If the sysfs files above do not exist, then ras-mc-ctl will fall back to parsing output of the dmidecode(8) utility. Use of this util-
ity will most often require that ras-mc-ctl be run as root.
SEE ALSO
fBrasdaemon(1)
RAS-MC-CTL(8)