Not real clear what you are after here. Some sssumptions I've made:
1. The order the files are output should remain the same as defined in config file
2. Multiple replaces may appear for each file
3. Replace tag (eg @Phone@) may have different values for different files
Here is the solution in awk:
Last edited by Chubler_XL; 04-06-2011 at 07:35 PM..
This User Gave Thanks to Chubler_XL For This Post:
file1: has all words to be searched.
100007
200999
299997
File2: has all file names to be searched.
C:\search1.txt
C:\search2.txt
C:\search3.txt
C:\search4.txt
Outfile: should have all found lines.
Logic: Read each word in file1 and search each file in the list of File2; if the... (8 Replies)
First, thanks for the help in previous posts... couldn't have gotten where I am now without it!
So here is what I have, I use AWK to match $1 and $2 as 1 string in file1 to $1 and $2 as 1 string in file2. Now I'm wondering if I can extend this AWK command to incorporate the following:
If $1... (4 Replies)
Hello,
I was hoping someone could help me with this work related problem...
basically what I want to do is the following:
file2:
1 o
2 t
4 f
5 v
7 n
8 e
10 a
file1:
1 : (8 Replies)
I have 2 files:
file1.txt:
1|15|XXXXXX||9630716||0096000||30/04/2012|E|O|X||||20120525135617-30.04.2012|PAT66OLM|STA||||00001|STA_0096000_YYYPPPXTMEX00_20120525135617_02_P.pdf|... (2 Replies)
I have very limited coding skills but I'm wondering if someone could help me with this. There are many threads about matching strings in two files, but I have no idea how to add a column from one file to another based on a matching string.
I'm looking to match column1 in file1 to the number... (3 Replies)
Hi Freinds,
i have a file1 as below
file1
1|ndmf|fdd|d3484|34874
2|jdehf|wru7|478|w489
3|dfkj|wej|484|49894
file2 contains lakhs of records and not in sorted order
i want to retrive only the records from file2 by searcing the first field of file 1
i used
grep ^1 file2... (4 Replies)
Dear All,
Need your help..:D
I am not regular on shell scripts..:(
I have 2 files..
Content of file1
cellRef 4};"4038_2_MTNL_KALAMBOLI"
cellRef 1020};"4112_3_RAINBOW_BLDG"
cellRef 134};"4049_2_TATA_HOSPITAL"
cellRef 1003};"4242_3_HITESH_CONSTRUCTION"
cellRef... (6 Replies)
I am trying to use awk to find all the $2 values in file2 which is ~30MB and tab-delimited, that are between $2 and $3 in file1 which is ~2GB and tab-delimited.
I have just found out that I need to use $1 and $2 and $3 from file1 and $1 and $2of file2 must match $1 of file1 and be in the range... (6 Replies)
Trying to use awk to:
update $2 in file2 with the $2 value in file1, if $1 in file1 matches $13 in file2, which is tab-delimeted. The $2values may already be the same so in that case nothing happens and the next line is processed.
There are exactly 4,605 unique $13 values. Thank you :).
... (4 Replies)
In the awk below I am trying to set/update the value of $14 in file2 in
bold, using the matching NM_ in $12 or $9 in file2
with the NM_ in $2 of file1.
The lengths of $9 and $12 can be variable but what is consistent is the start pattern
will always be NM_ and the end pattern is always ;... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT CENTOS
hwlocality_cudart
CUDA Runtime API Specific Functions(3) Hardware Locality (hwloc) CUDA Runtime API Specific Functions(3)NAME
CUDA Runtime API Specific Functions -
Functions
static inline int hwloc_cudart_get_device_pci_ids (hwloc_topology_t topology , int idx, int *domain, int *bus, int *dev)
static inline int hwloc_cudart_get_device_cpuset (hwloc_topology_t topology , int idx, hwloc_cpuset_t set)
static inline hwloc_obj_t hwloc_cudart_get_device_pcidev (hwloc_topology_t topology, int idx)
static inline hwloc_obj_t hwloc_cudart_get_device_osdev_by_index (hwloc_topology_t topology, unsigned idx)
Detailed DescriptionFunction Documentation
static inline int hwloc_cudart_get_device_cpuset (hwloc_topology_t topology, intidx, hwloc_cpuset_tset) [static]
Get the CPU set of logical processors that are physically close to device idx. Return the CPU set describing the locality of the CUDA
device whose index is idx.
Topology topology and device idx must match the local machine. I/O devices detection and the CUDA component are not needed in the topology.
The function only returns the locality of the device. If more information about the device is needed, OS objects should be used instead,
see hwloc_cudart_get_device_osdev_by_index().
This function is currently only implemented in a meaningful way for Linux; other systems will simply get a full cpuset.
static inline hwloc_obj_t hwloc_cudart_get_device_osdev_by_index (hwloc_topology_ttopology, unsignedidx) [static]
Get the hwloc OS device object corresponding to the CUDA device whose index is idx. Return the OS device object describing the CUDA device
whose index is idx. Return NULL if there is none.
The topology topology does not necessarily have to match the current machine. For instance the topology may be an XML import of a remote
host. I/O devices detection and the CUDA component must be enabled in the topology. If not, the locality of the object may still be found
using hwloc_cudart_get_device_cpuset().
Note:
The corresponding PCI device object can be obtained by looking at the OS device parent object.
This function is identical to hwloc_cuda_get_device_osdev_by_index().
static inline int hwloc_cudart_get_device_pci_ids (hwloc_topology_t topology, intidx, int *domain, int *bus, int *dev) [static]
Return the domain, bus and device IDs of the CUDA device whose index is idx. Device index idx must match the local machine.
static inline hwloc_obj_t hwloc_cudart_get_device_pcidev (hwloc_topology_ttopology, intidx) [static]
Get the hwloc PCI device object corresponding to the CUDA device whose index is idx. Return the PCI device object describing the CUDA
device whose index is idx. Return NULL if there is none.
Topology topology and device idx must match the local machine. I/O devices detection must be enabled in topology topology. The CUDA
component is not needed in the topology.
Author
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code.
Version 1.7 Sun Apr 7 2013 CUDA Runtime API Specific Functions(3)