Search Results

Search: Posts Made By: clippertm
1,236
Posted By clippertm
Excellent, thanks again Aia, this is very helpful.
Excellent, thanks again Aia, this is very helpful.
1,236
Posted By clippertm
Hi Aia, Thanks! That works well. I am not...
Hi Aia,

Thanks! That works well. I am not familiar with find, how would you add a grep in there?
1,236
Posted By clippertm
Exclude particular files from strings
Hi everyone,

Is it possible to have the command strings exclude particular files?

Here is what I am currently writing:

strings *20161212*


It prints all files in the directory, which is...
3,561
Posted By clippertm
Thanks Chubler! This expands my horizon and is...
Thanks Chubler! This expands my horizon and is easy to use. Any idea on how not having to have to input 10, 11 & 20 at all? Perhaps a range from 00 to 99? So that whatever number is at position...
3,561
Posted By clippertm
Hi, Thank you all for your replies. My...
Hi,

Thank you all for your replies. My apologies if I was not not specific enough, I will do my best. No, this is not homework, just a bunch of files I need to analyse for one of my hobbies. I...
3,561
Posted By clippertm
Shell Scripting | Return list of unique characters in files
Hi,

I am trying to script the below, but I am not very good at it :(

Your help would be greatly appreciated.

1. read all files in the directory in strings
strings *.*

2. in each file,...
11,645
Posted By clippertm
Hi Lucas, I don't change it for fun! it...
Hi Lucas,

I don't change it for fun!

it is because sometimes the pattern changes: 3078= and 4=* can be anywhere on one line :(

I was only trying to find out why what you wrote returned so...
11,645
Posted By clippertm
Hello Lucas, Thanks again for your help! ...
Hello Lucas,

Thanks again for your help!

It works with data1-2.txt, but then if I change '3078=' to '5022=", it returns the below:



I tried to re-arrange the command but with no success :(
11,645
Posted By clippertm
Adding expected output:
Adding expected output:
11,645
Posted By clippertm
Sample files!
Sample files!
11,645
Posted By clippertm
Hi Lucas, Sorry it does not work :D ...
Hi Lucas,

Sorry it does not work :D

cannot work because sometimes there are different "4=*" per file. If it returns only one per file, then it misses all the other "4=*" :(

If I write:
grep...
11,645
Posted By clippertm
Hi Lucas, Thank you for the range! The...
Hi Lucas,

Thank you for the range!

The output I am looking for is a. line has 4=745 and 3078=

Thanks again for your help!

---------- Post updated at 09:35 PM ---------- Previous update...
11,645
Posted By clippertm
Nope it does not work returns less lines...
Nope it does not work

returns less lines than it should...

---------- Post updated at 04:44 AM ---------- Previous update was at 04:43 AM ----------

Hi Lucas,

I do not how to use...
11,645
Posted By clippertm
Hi Apm, Well thank you for your reply, but I...
Hi Apm,

Well thank you for your reply, but I only know grep :o

I have never used awk or perl :o

---------- Post updated at 04:28 AM ---------- Previous update was at 04:24 AM ----------

I...
11,645
Posted By clippertm
Hi Lucas, No problem. Thanks, the count...
Hi Lucas,

No problem.

Thanks, the count loop seems to work, but the whole command does not seem to return unique occurences anymore, but all of them :confused:
11,645
Posted By clippertm
Hi Lucas, My environment is also cygwin...
Hi Lucas,

My environment is also cygwin (latest).
grep -h '4=[745-755]++' *.* | grep '3078=' | sort -u -t'|' -k2,2
does not work, it stalls (I used 745-755 to simplify and make things faster, I...
11,645
Posted By clippertm
Hi Lucas, The pattern file is line...
Hi Lucas,



The pattern file is line separated.

The data files are "|" separated. In addition, "4=74*" and "3078=" are not always at the same position.
11,645
Posted By clippertm
Hi Lucas! Yes! This is the spirit! ...
Hi Lucas!

Yes! This is the spirit!

However I realise that my list file does not work :o
$ grep -h -f ../list.txt *.* | grep '3078=' | sort -u -t'|' -k2,2
only returns one line instead of 4...
11,645
Posted By clippertm
Print unique values across all files
Hello Everyone!

I have updated the first post so that my intentions are easier to understand, and also attached sample files (post #18).

I have over 500 text files in a directory. Over 1 GB of...
Showing results 1 to 19 of 19

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