Tagged Questions
0
votes
3answers
43 views
Split text file by hash value of first field in line
I am looking for a fast filter that will take a text file on standard input, hash each line up to the first tab character, and put the line into a different file depending on the hash value (modulo ...
0
votes
1answer
30 views
What does shiftwidth do in VIM editor
I read this about shiftwidth option on Google: To change the number of space characters inserted for indentation, use the 'shiftwidth' option.
Ok Ok, but what's that more exactly? How can I try this ...
2
votes
3answers
107 views
How to extract bytes from the middle of a file?
We are parsing some large EDI files that do not contain CR/LF. However, they do have ~ (tilde) as a segment delimiter.
I am trying to extract the control record for the file and the last bytes of my ...
0
votes
2answers
54 views
How to calculate a column of sums or test inequalities?
Given
34-2
34-5
34-3
I'm looking to obtain
34-2=28
34-5=29
34-3=31
Or, this would also be helpful:
given:
34-2=5
34-5<=34
34-3=31
I'm looking to obtain
! 34-2=5
34-5<=34
...
0
votes
1answer
232 views
Append line length at end of each line
Given input:
tree
branch
the desired output is
tree 4
branch 6
What is a *nix available command that does this?
0
votes
0answers
155 views
getting complement of two text files on unix command line
Can someone recommend a fast unix-based utility (ideally written in C) for getting efficient, streaming intersection/union of tab-delimited text files? For example, allow queries such as "give me the ...
0
votes
1answer
5k views
UNIX: how to merge 2 text files?
Is there a way to merge 2 text files into one (by appending the content of the second right after the first one) in Unix ?
4
votes
5answers
883 views
Open source command line tools for indexing a large number of text files
I'm looking for any open source command line tool or tools which will allow me to index and search a large number of plain text files. Approximate search would be a plus. The tool only needs to print ...
2
votes
5answers
226 views
How do I reverse the lines of a file in UNIX
How can i reverse a line in a file in Order
Example :
Input file :
123
500
1000
LOAN
GOD
10000
01000
Output Format:
321
005
0001
NAOL
DOG
00001
00010
1
vote
2answers
910 views
Recovering text files in terminal using grep on Mac OS X Snow Leopard
I foolishly removed some source code from my Mac OS X Snow Leopard machine with rm -rf when doing something with buildout. I want to try and recover these files again. I haven't touched the system ...
