script to grep a pattern from file compare contents with another file and replace
Hi All,
Need help on this
I have 2 files
one file file1 which has several entries as :
another file file2:
I wanted to compare the entries in the line
"hostgroup_name !host1,!host5,!host6,.*" of file1 for each service definition with the contents of the file2 and replace the entries under the hostgroup_name with the missing contents removing the existing content
Hi
I have a file that looks like this:
Line 0
animal elephant
Line 1
animal elephant
Line 2
animal elephant
Line 3
animal elephant
What i am aiming to do is with a script and an input value of... (6 Replies)
I have some complication with this, I have a file like below for DEV_1 till DEV_10. and the db values are set accordinly which are not unique. For example DEV1,DEV4,DEV6 can have the same target DB name.
I waned to identify for DEV_2 and then replace the TARGET_DATABASE value with the new DB... (6 Replies)
Give shell script....which takes two file names as input and compares the contents, is both are same delete second file's contents.....
I try with "diff"...... but confusion how to use "diff" with if ---else
Thanking you (5 Replies)
Hello
Has anyone got an example shell script that I can use to compare the contents of two files.
The files should contain the same contents, eg.
file1.txt
apple
pear
grape
file2.txt
apple
pear
grape (2 Replies)
We have 2 file XML files - FILE1.XML and FILE2.xml - we need copy the contents of FILE1.XML and replace in FILE2.xml pattern "<assignedAttributeList></assignedAttributeList>"
FILE1.XML
1. <itemList>
2. <item type="Manufactured">
3. <resourceCode>431048</resourceCode>
4. ... (0 Replies)
*****************************************
Right now i have this current system.
I have two files say xxx.txt and yyy.txt. xxx.txt is with list of patterns within double quotes. Eg.
"this is the line1"
"this is the line2"
The yyy.txt with lot of lines. eg:
"This is a test message which... (7 Replies)
Hi,
I am facing issue while reading data from a file in UNIX. my requirement is to compare two files and for the text pattern matching in the 1st file, replace the contents in second file by the contents of first file from start to the end and write the contents to thrid file.
i am able to... (2 Replies)
Shell script logic
Hi
I have 2 input files like with file 1 content as (file1)
"BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt
File 2 contents as fle(2)
"BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt
I want to get... (22 Replies)
I have two files blocks.txt and rules.txt. In blocks.txt i have the following entries
Linux1
Linux2
Linux3
.....
Linux10
In rules.txt i have the lines where a filename pattern starts like
'blk-name.*'
I want to replace 'blk-name' with the names read from blocks.txt file
I tried... (2 Replies)
Discussion started by: Jag02
2 Replies
LEARN ABOUT CENTOS
hwloc-assembler-remote
HWLOC-ASSEMBLER-REMOTE(1) hwloc HWLOC-ASSEMBLER-REMOTE(1)NAME
hwloc-assembler-remote - Assemble multiple remote host topologies
SYNOPSIS
hwloc-assembler-remote [options] output.xml host1 host2 ...
OPTIONS --ssh <ssh>
Use the given ssh command (and options) to connect to remote hosts.
--lstopo-path <path>
Use the given path as the remote lstopo command when gathering remote topologies. By default, lstopo is taken from the PATH envi-
ronment variable.
--lstopo-opts <opts>
Pass the given lstopo options when gathering remote topologies.
--show Display the resulting topology before exit.
-f --force
Ignore failure to load a remote host topology.
DESCRIPTION
hwloc-assembler-remote is a frontend to hwloc-assembler. It takes care of retrieving the remote nodes' topologies before assembling them
with hwloc-assembler.
EXAMPLES
To assemble three nodes topologies:
$ hwloc-assembler-remote output.xml host1 host2 host3
To assemble the topology of a multi-process MPI job defined as a machinefile:
$ hwloc-assembler-remote output.xml `cat machinefile | sort | uniq`
RETURN VALUE
Upon successful execution, hwloc-assembler-remote returns 0.
hwloc-assembler-remote will return nonzero if any kind of error occurs, such as (but not limited to) failure to parse the command line.
SEE ALSO hwloc(7), lstopo(1), hwloc-assembler(1)1.7 Apr 07, 2013 HWLOC-ASSEMBLER-REMOTE(1)