Search Results

Search: Posts Made By: shoaibjameel123
3,813
Posted By shoaibjameel123
Hi Don Cragun, I tried with all suggestions and...
Hi Don Cragun,
I tried with all suggestions and I thank everyone including you, and as usual (which has happened in the past too!), your solution worked out ideal for me. Given that there are...
3,813
Posted By shoaibjameel123
The table data has been obtained from web pages,...
The table data has been obtained from web pages, which are very noisy. In the first table, there are two columns where the first few strings could not be obtained in both columns. This could be...
3,813
Posted By shoaibjameel123
Tabulate data in a table.
I have about a million tables stored as .txt files in a directory. The content of the files look like this:



ages-eligible-for-study:
genders-eligible-for-study:
accepts-healthy-volunteers:...
1,521
Posted By shoaibjameel123
Thanks, and sorry for not being very clear in my...
Thanks, and sorry for not being very clear in my initial post. The output that I am trying to get is:
'''Anarchism''' is a [[political-philosophy]] that advocates [[self-governance|self-governed]]...
1,521
Posted By shoaibjameel123
[Solved] Replacing space with hyphen in a pattern.
I have a huge text file, about 52 GB. In the file, there are patterns like these:
[[Renaissance humanism|renaissance]]
[[Taoism|Taoist]]
[[Foundation for Economic Education]]...
1,382
Posted By shoaibjameel123
Thanks. The output is exactly what I want, and...
Thanks. The output is exactly what I want, and thus it meets my requirement. The difference now is that your is a much faster way to get the output.
1,382
Posted By shoaibjameel123
[SOLVED] Repeat same word in the rest of the column.
My input is:
a.txt computer
b.txt
c.txt
e.txt
I want my output to be:
a.txt computer
b.txt computer
c.txt computer
e.txt computer
There are about 100000 text files having the same format as...
Forum: Programming 03-11-2016
1,628
Posted By shoaibjameel123
Hsearch() problem when searching for strings.
I have written a code in C where the objective is to search for strings.

There are two files:
1. Database file which has more than one billion entries. This file is read in argv[1] in the C code...
4,380
Posted By shoaibjameel123
Thanks. Yes, both of them work. It solves my...
Thanks. Yes, both of them work. It solves my problem.
4,380
Posted By shoaibjameel123
[Solved] Concatenate values in the first column based on the second column.
I have a file (myfile.txt) with contents like this:

1.txt apple is
3.txt apple is
5.txt apple is
2.txt apple is a
7.txt apple is a
8.txt apple is a fruit
4.txt orange not a fruit
6.txt zero...
4,434
Posted By shoaibjameel123
Thanks. Running the script now. I will post again...
Thanks. Running the script now. I will post again about the observations.
4,434
Posted By shoaibjameel123
Large search replace using sed results in memory problem.
I have one big file of size 9GB (big_file.txt). This big file has sentences and paragraphs like any usual English document. I have another file consisting of replacement strings for sed to use. The...
8,777
Posted By shoaibjameel123
I just tried your code, and this is perhaps the...
I just tried your code, and this is perhaps the best that I have tried so far in terms of efficiency. I am currently running multiple instances of a much slower version on my machine using GNU...
8,777
Posted By shoaibjameel123
Suppose w is a word. Let us take w='receive', as...
Suppose w is a word. Let us take w='receive', as used by you. My objective is to extract two words before and after 'receive'. So what I want is this:

primaries to receive the presidential

But...
8,777
Posted By shoaibjameel123
Yes, I used split command to split the...
Yes, I used split command to split the big_file.txt to smaller chunks of 350MB each. I then tried your command and others too on one of these smaller chunks. I noticed that your suggested case takes...
8,777
Posted By shoaibjameel123
Thanks, drl. I can see some improvement using...
Thanks, drl. I can see some improvement using your command as I can see that all words in "obama|primaries|water" are searched at the same time. This can surely help reduce the amount of iterations...
8,777
Posted By shoaibjameel123
Thanks for your responses. When I ran RudiC's...
Thanks for your responses. When I ran RudiC's script, I did not see any output for five minutes and the memory usage crossed 60%. I had to stop running it, but I thank RudiC for his script. I did not...
8,777
Posted By shoaibjameel123
In memory grep of a large file.
I have two files:
1. A huge 8 GB text file. (big_file.txt)
2. A huge list of words approximately 8 million of them. (words_file.txt). Each word is separated by a newline.

What I intend to do is...
13,791
Posted By shoaibjameel123
Extract words before and after a certain word.
I have a sample text file with file name: sample.txt

The text file has the following text.
this is an example text where we have to extract certain words before and after certain word these words...
5,796
Posted By shoaibjameel123
Removing hyphen from beginning and end of a word only.
It is very simple to remove a hyphen from a word anywhere in that word using a simple sed command (sed -i 's/-//g' filename), but I am not able to figure out how to do this:

For example,
apple...
1,129
Posted By shoaibjameel123
Extract few content from a huge list of files
I have a huge list of files (about 300,000) which have a pattern like this.

.I 1
.U
87049087
.S
Am J Emerg
.M
Allied Health Personnel/*; Electric Countershock/*;
.T
Refibrillation managed...
1,896
Posted By shoaibjameel123
Yes, in my case the first column contains only 0...
Yes, in my case the first column contains only 0 and 1. However, it is good to see others generalize to other values.
1,896
Posted By shoaibjameel123
Changing values in the first column.
I have a file which looks like this:

1 3 5 5 3 2
1 5 3 6 3 2
0 5 6 3 2 9
0 4 5 6 4 9

In the first column, instead of 1, I want to place +1 and instead of 0, I want -1 to be put. So the...
1,153
Posted By shoaibjameel123
Subtract 1 from all columns except columns 1 and 2
I have a file which has all integer numbers like this. This file is sort of very large, and I am only showing the first few contents. This representation can be regarded as a matrix of integer...
7,025
Posted By shoaibjameel123
Finding the same pattern in three consecutive lines in several files in a directory
I know how to search for a pattern/regular expression in many files that I have in a directory. For example, by doing this:
grep -Ril "News/U.S." .
I can find which files contain the pattern...
Showing results 1 to 25 of 184

 
All times are GMT -4. The time now is 10:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy