However when i submit it to the system I'm getting what appears to be a spacing problem.
System output
prac1
prac2
prac3
part1temp1
part1temp2
Marks
not only do i have a spacing problem but some of the id's are not joining properly such as 12345678
---------- Post updated at 06:54 AM ---------- Previous update was at 06:38 AM ----------
im using the exact same code on my macbook and it's doing it properly. both using #!/bin/sh
---------- Post updated at 06:59 AM ---------- Previous update was at 06:54 AM ----------
ah nvm it wasn't hte exact same. i didn't sort on my other one.
still isn't right though..
any ideas?
---------- Post updated at 07:19 AM ---------- Previous update was at 06:59 AM ----------
ok i've solved the sorting problem i think. i got rid of the -n's arguments. and it all combined together well. after that i sorted with -n.
however the spacing problem is still there
---------- Post updated at 07:26 AM ---------- Previous update was at 07:19 AM ----------
I almost have it. between the results and id, i have an extra space. how the hell do i get rid of it!
here's my updated code
Is that what you want ?
Next time please post the required output(what you expect).
Yeah thats right however i have to join -_-. sorry.
Sorry i'm just posting the required output so you know what im trying to get rid of. It's not what im expecting, cause the test data i have works. It's just when i submit my program to the system, it spits back what isn't right. and what isn't right is that i've got this extra space dangling around.
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)
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)
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)
I want basically to merge two config files each of them look like that
File:Option1 value1
Optionx valuex
....
One of those files is default config while the other is generated by my script. Now here is the problem, when my script generates an option that previously has been set by default i... (4 Replies)
joining two files:
File1:
-----
1|M
2|M
3|F
File2:
-----
1|abc|def
3|xyz|pqr
join -t '|' 1.txt 2.txt gives(Itried many other ways)
1|M|abc|def
3|F|xyz|pqr
but I need the result like following (14 Replies)
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)
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)