Sponsored Content
Full Discussion: Join On A String
Top Forums UNIX for Dummies Questions & Answers Join On A String Post 302714011 by jimmyf on Thursday 11th of October 2012 02:51:33 PM
Old 10-11-2012
Join On A String

Is is possible to join on unsorted files by a string? Don't want to sort because there is other text that is already in a good format.

File1 has this text string:
ABCD-123 FGH

File2 has this text string:
ABCD-123

I want to replace or join ABCD-123 in file 2 with ABCD-123 FGH in file 1.
Thank you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Use of uninitialized value in join or string at arraydef.pl

When try to execute the following script, its throwing this error: " Use of uninitialized value in join or string at arraydef.pl line 17. " The script is : 1 #!/usr/bin/perl 2 3 use strict; 4 5 my @a = ( 1...10 ); 6 7 print " Original array : @a... (5 Replies)
Discussion started by: praveen_b744
5 Replies

2. Shell Programming and Scripting

join (pls help on join command)

Hi, I am a new learner of join command. Some result really make me confused. Please kindly help me. input: file1: LEO oracle engineer 210375 P.Jones Office Runner ID897 L.Clip Personl Chief ID982 S.Round UNIX admin ID6 file2: Dept2C ID897 6 years Dept5Z ID982 1 year Dept3S ID6 2... (1 Reply)
Discussion started by: summer_cherry
1 Replies

3. Programming

sql,multiple join,outer join issue

example sql: select a.a1,b.b1,c.c1,d.d1,e.e1 from a left outer join b on a.x=b.x left outer join c on b.y=c.y left outer join d on d.z=a.z inner join a.t=e.t I know how single outer or inner join works in sql. But I don't really understand when there are multiple of them. can... (0 Replies)
Discussion started by: robbiezr
0 Replies

4. UNIX for Dummies Questions & Answers

Join 2 files with multiple columns: awk/grep/join?

Hello, My apologies if this has been posted elsewhere, I have had a look at several threads but I am still confused how to use these functions. I have two files, each with 5 columns: File A: (tab-delimited) PDB CHAIN Start End Fragment 1avq A 171 176 awyfan 1avq A 172 177 wyfany 1c7k A 2 7... (3 Replies)
Discussion started by: InfoSeeker
3 Replies

5. Shell Programming and Scripting

Join lines with the same start string

I have the text like: DN11-001 Thats the first line which needs to be DN11-001 joined with the second line and also to DN11-001 the third line as they all begin with the same DN11-001 document number. DN11-002 The number of lines differ DN11-002 among the documents. DN11-005 It can also be... (10 Replies)
Discussion started by: andrejm
10 Replies

6. UNIX for Dummies Questions & Answers

how to join two files using "Join" command with one common field in this problem?

file1: Toronto:12439755:1076359:July 1, 1867:6 Quebec City:7560592:1542056:July 1, 1867:5 Halifax:938134:55284:July 1, 1867:4 Fredericton:751400:72908:July 1, 1867:3 Winnipeg:1170300:647797:July 15, 1870:7 Victoria:4168123:944735:July 20, 1871:10 Charlottetown:137900:5660:July 1, 1873:2... (2 Replies)
Discussion started by: mindfreak
2 Replies

7. Shell Programming and Scripting

sed or awk command to replace a string pattern with another string based on position of this string

here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb cat dump.sql INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies

8. UNIX for Dummies Questions & Answers

How to use the the join command to join multiple files by a common column

Hi, I have 20 tab delimited text files that have a common column (column 1). The files are named GSM1.txt through GSM20.txt. Each file has 3 columns (2 other columns in addition to the first common column). I want to write a script to join the files by the first common column so that in the... (5 Replies)
Discussion started by: evelibertine
5 Replies

9. UNIX for Dummies Questions & Answers

awk - How to join the string with values

Hi, I'm a beginner in awk script. I've been trying to figure how to concatenate two string in input file using awk after the value is calculated. I'm trying to get this format Apple 5.2(10) Orange 4.4(8) Watermelon 3.10(30) Berries 10.2(20) The input file with the format fruit... (2 Replies)
Discussion started by: KCApple
2 Replies

10. Shell Programming and Scripting

Join, merge, fill NULL the void columns of multiples files like sql "LEFT JOIN" by using awk

Hello, This post is already here but want to do this with another way Merge multiples files with multiples duplicates keys by filling "NULL" the void columns for anothers joinning files file1.csv: 1|abc 1|def 2|ghi 2|jkl 3|mno 3|pqr file2.csv: 1|123|jojo 1|NULL|bibi... (2 Replies)
Discussion started by: yjacknewton
2 Replies
GITNAMESPACES(7)						    Git Manual							  GITNAMESPACES(7)

NAME
gitnamespaces - Git namespaces SYNOPSIS
GIT_NAMESPACE=<namespace> git upload-pack GIT_NAMESPACE=<namespace> git receive-pack DESCRIPTION
Git supports dividing the refs of a single repository into multiple namespaces, each of which has its own branches, tags, and HEAD. Git can expose each namespace as an independent repository to pull from and push to, while sharing the object store, and exposing all the refs to operations such as git-gc(1). Storing multiple repositories as namespaces of a single repository avoids storing duplicate copies of the same objects, such as when storing multiple branches of the same source. The alternates mechanism provides similar support for avoiding duplicates, but alternates do not prevent duplication between new objects added to the repositories without ongoing maintenance, while namespaces do. To specify a namespace, set the GIT_NAMESPACE environment variable to the namespace. For each ref namespace, Git stores the corresponding refs in a directory under refs/namespaces/. For example, GIT_NAMESPACE=foo will store refs under refs/namespaces/foo/. You can also specify namespaces via the --namespace option to git(1). Note that namespaces which include a / will expand to a hierarchy of namespaces; for example, GIT_NAMESPACE=foo/bar will store refs under refs/namespaces/foo/refs/namespaces/bar/. This makes paths in GIT_NAMESPACE behave hierarchically, so that cloning with GIT_NAMESPACE=foo/bar produces the same result as cloning with GIT_NAMESPACE=foo and cloning from that repo with GIT_NAMESPACE=bar. It also avoids ambiguity with strange namespace paths such as foo/refs/heads/, which could otherwise generate directory/file conflicts within the refs directory. git-upload-pack(1) and git-receive-pack(1) rewrite the names of refs as specified by GIT_NAMESPACE. git-upload-pack and git-receive-pack will ignore all references outside the specified namespace. The smart HTTP server, git-http-backend(1), will pass GIT_NAMESPACE through to the backend programs; see git-http-backend(1) for sample configuration to expose repository namespaces as repositories. For a simple local test, you can use git-remote-ext(1): git clone ext::'git --namespace=foo %s /tmp/prefixed.git' SECURITY
Anyone with access to any namespace within a repository can potentially access objects from any other namespace stored in the same repository. You can't directly say "give me object ABCD" if you don't have a ref to it, but you can do some other sneaky things like: 1. Claiming to push ABCD, at which point the server will optimize out the need for you to actually send it. Now you have a ref to ABCD and can fetch it (claiming not to have it, of course). 2. Requesting other refs, claiming that you have ABCD, at which point the server may generate deltas against ABCD. None of this causes a problem if you only host public repositories, or if everyone who may read one namespace may also read everything in every other namespace (for instance, if everyone in an organization has read permission to every repository). Git 1.8.3.1 06/10/2014 GITNAMESPACES(7)
All times are GMT -4. The time now is 10:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy