Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 days ago.
Improve this question
I've been working through this for a bit and I'm pretty sure it is something easy I'm missing (sometimes too much time at a command line does that) and I'm hoping someone can lend a quick hand on how to accomplish this.
I have two files with different numbers of columns, but with one data item that I'd like to use for matching:
File1.txt
703e.ac65.7cdc,UserA
b035.b5e8.48cd,UserB
e0b5.5fdb.d394,UserC
...
File2.txt
0002.75e5.49a3,AP1,30
703e.ac65.7cdc,AP2,32
02d5.44b9.f88a,AP2,33
e0b5.5fdb.d394,AP3,30
...
I'd like to generate an output where ",UserX" is added to the row in File2 when column 1 of File1 and File2 matches similar to this below:
703e.ac65.7cdc,AP2,32,UserA
e0b5.5fdb.d394,AP3,30,UserC
I've been fiddling with sed to do this but there might be a better tool. Thanks for the help / taking a look / offering your advice!
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I have just started learning the Linux system and I need some help to translate the following to English:
grep WARNING readme.txt
and
grep WARNING readme.txt > warnings.txt
This is a homework question that i have researched myself but having trouble learning exactly what it means.
thanks in advance.
Try making a file on your computer named readme.txt. Put some lines of text in there, and make sure that some lines say "WARNING" while other lines do not.
Then run your first command and observe its output.
Then run your second command and observe its output and observe what was written to warnings.txt.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
Problem, step by step:
Create a spreadsheet
Paste a csv file
Create a sort filter
Use the sort filter (A-Z)
Close the file (wait saving process)
Open the file (BANG: some rows was erased)
I consider a serious problem (consistency) as well as the correction a determining factor for an effective use or contracting of the solution.
This problem reproduced by me: https://youtu.be/M6_sEu8_F_E
Is there any expecting for repair or an alternative solution?
This problem will fixed in version 4.2
See https://github.com/ONLYOFFICE/DocumentServer/issues/63#issuecomment-259364585 (I assume this is your issue too)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I want to find patterns that are listed in one file and find them in other file.
The second file has those patterns separated by commas.
for e.g. first file F1 has genes
ENSG00000187546
ENSG00000113492
ENSG00000166971
and second file F2 has those genes along with some more columns which I need
ENSG00000164252
ENSG00000187546
ENSG00000113492
ENSG00000166971,ENSG00000186106
So the gene ENSG00000166971 which is present in the second file does not show up in grep because it has another gene with it,separated by comma.
My code is:
grep -f "F1.txt" "F2.txt" >output.txt
I want those values even if one of them is present,and the associated data with it.Is there any way to do this?
Tried to create the same situation.
getting ENSG00000166971 in the grep result.
may be this is due to different version.
i m using Fedora release 20 with grep 2.14.56-1e3d.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have a large dump of data from an outlook email account that comes entirely in .msg files. A quick call to ubuntu's file method revealed that they were Composite Document File V2 Documents (whatever that means). I would really like to be able to read these files as plaintext. Is that possible at all?
Update: Turns out it wasn't totally possible to do what I wanted for large scale data mining on these kinds of files which was a bummer. In case you face the same issue I made a library to address this issue. https://github.com/Slater-Victoroff/msgReader
Documentation isn't great, but it's a pretty small library so it should be self explanatory.
I faced the same problem this morning. I didn't find any information on the file format but it was possible to extract the required information from the file using strings and grep:
strings -e l *.msg | grep pattern
The -e l (that's a small L) converts from UTF-16.
This will only work if you can grep the data you need from the file (i.e. all required lines contain a standard string or pattern).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I would like to diff two versions of a file that reside in different directories, for example:
diff ./dirA/foo.txt ./dirB/foo.txt
I vaguely remember there is a way to write this in a more condensed way, so that the filename appears only once. Something like:
diff {./dirA/, ./dirB/}foo.txt
Anyone know how to do this?
Close. No space.
diff dir{A,B}/foo.txt
or, in the more likely case that the two folders don't actually have a common substring like that,
diff {dir,folder}/foo.txt
And, should you want to compare the whole tree, note that diff has a recursive (-r) option.
You're close:
diff {dirA,dirB}/foo.txt
that should work for you.
So close.
diff {./dirA/,./dirB/}foo.txt
or
diff ./{dirA,dirB}/foo.txt
You could do this:
diff ./dirA/foo.txt dirB
is this what you were thinking of?