Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: verse123
975
Posted By verse123
Thanks for the response. I have a question. How...
Thanks for the response. I have a question. How are you reading in the files that do not have the .enr extension?
975
Posted By verse123
Apologies for being unclear. Im trying compare...
Apologies for being unclear. Im trying compare values between files and if they match I want to extract some characters in between those values for many files. They are in two directories and have...
975
Posted By verse123
Outputting 1 file per row if pattern exists between files
I have many files that can have various amounts of rows. I essentially want to output each row into a new file if a pattern is matched between two files.

I have some code that does something...
1,490
Posted By verse123
Thanks these worked. In the case that I have many...
Thanks these worked. In the case that I have many input rows how can I generate an output for each row with the appropriate matches?
1,069
Posted By verse123
could you please explain for file in *file;...
could you please explain

for file in *file; do
awk '{s = FNR==1 ? "\"""name""\"" : "\""FILENAME"\"" ; print s,$0}' OFS=',' $file >"New_$file"
done
1,490
Posted By verse123
Extracting range of characters if pattern matches
Im trying compare values between files and if they match I want to extract some characters in between those values for many files. They are in two directories and have the name filename but one ends...
1,069
Posted By verse123
Putting file name inside file
I have a bunch of files with unique names. Inside each file are either 1 or more than 1 rows. I would like the name of the file to appear inside the file itself, once per row (except for the first...
826
Posted By verse123
Splitting strings
I have a file that has two columns. I first column is an identifier and the second is a column of strings. I want to split the characters in the second column into substrings of length 5. So if the...
1,377
Posted By verse123
If there are for example 5 occurrences, then it...
If there are for example 5 occurrences, then it should be like this:


1) last substring of line 5 with beginning substring of line 5
2) last substring of line 5 with beginning substring of line...
1,377
Posted By verse123
Here's a sample input for an example of 3...
Here's a sample input for an example of 3 occurrences. I want to generate specific combinations of a 9 character substring based on the last occurrence of the ID %dog (line 3) with the beginning...
1,377
Posted By verse123
after the ID is a tab space. The string field...
after the ID is a tab space. The string field varies in length, but the parts that should be joined should just be 9 character substrings from either the beginning or the end. In total, each output...
1,377
Posted By verse123
hi spacebar, the rules you wrote out are correct....
hi spacebar, the rules you wrote out are correct. I should just mention that the file only has two columns (ID and string column). I made the last segments of the strings capital letters for clarity...
1,377
Posted By verse123
Joining ends of strings in certain order with repeated ID's
I posted this a few days ago and got some help (Putting together substrings if pattern is matched - Page 2 | Unix Linux Forums | Shell Programming and Scripting...
1,750
Posted By verse123
Assuming we have say 4 occurrences of the same ID...
Assuming we have say 4 occurrences of the same ID and want to combine the end of ID 4 with the beginning of ID4, the beginning of ID 3, and the beginning of ID 2, but not with the beginning of ID1....
2,324
Posted By verse123
Precisely Don. The file has already been sorted...
Precisely Don. The file has already been sorted by the columns you mentioned. Sorting isn't really the issue here though. The issue is finding the median for all strings in col1 that share an ID,...
2,324
Posted By verse123
Hi Corona, I have sorted by a different column...
Hi Corona, I have sorted by a different column and would like to find the median as a function of another sort. That's why I don't need to necessarily sort col 3.
2,324
Posted By verse123
Median calculator based on id match
I am trying to calculate the median of a column of numbers if they match an ID type on a different column. The input file has 3 columns. The column that has the ID is column 1 and the column with the...
1,750
Posted By verse123
An example for single occurrence looks like this....
An example for single occurrence looks like this.
input:

%TESGO
dfkjsdfgogogocatcatdogtwelvetwentygogogo


output:

%TESGO
ntygogogodfkjsdfgo



for a triple occurrence (or even an...
1,750
Posted By verse123
Your solution is actually what I was looking for,...
Your solution is actually what I was looking for, expect that for single occurring %ID's are as long as the input. So something like this would be the same in the output as in the input.
1,750
Posted By verse123
Scrutinizer, yours seems to work only when there...
Scrutinizer, yours seems to work only when there are multiple occurrences of the string ID and not in events when the string ID exists only once. It should still perform the same for those situations.
1,750
Posted By verse123
This is not homework actually. It's just an...
This is not homework actually. It's just an annoying problem I've run into and can't figure out. What I have tried is the following but it is no where near useful in my opinion.


cat file |...
1,750
Posted By verse123
Putting together substrings if pattern is matched
What I would like to do is if the lines with % have the same name, then combine the last 9 letters of the string underneath the last occurrence of that ID with the first 9 letters of the string...
1,309
Posted By verse123
that doesn't work either. I get 0's for the...
that doesn't work either. I get 0's for the string frequency column. It does, however, count the occurrence of the ID.
1,309
Posted By verse123
Scrutinizer, I am trying to incorporate your code...
Scrutinizer, I am trying to incorporate your code from #3 in a while loop but I need awk to use the substrings from file1 to search for a match in file2 and to count it based on the info from file2....
1,268
Posted By verse123
so I am trying to do something like this but what...
so I am trying to do something like this but what goes into say 1.out should not be the same output that goes into 2.out. Each out file should be the output of a single line from the while loop (but...
Showing results 1 to 25 of 83

 

Featured Tech Videos

All times are GMT -4. The time now is 01:33 PM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy