I used to create a file to read my patterns and call them with grep but now I want to use different sort of patterns and it does not work with a list on a accept file
I have a data like this as they are in sequence of 5
The box of tissues out of
The book, the pen and the
I have a list of words (the, of, and) and I am looking for a pattern of
The.* the
The.* of
The.* and
.
.
.
note: I seem to have problem with of and off and coffee as well
Basically a loop to go through each of them one by one…
Not sure if that’s possible but even if not I am more than happy to predefine all my patterns in the file
But now that I put that patterns in the file and call them, the output file is empty
Can you tell me what am I doing wrong ?
Thank you in advance
A-V
You have to escape metacharacters
or put each line inside single tics. Also grep -F means "do not use metcharacters (regexp)" so even if it gets read in correctly it won't work.
if can write a single line which will work and that is
and it shows 90% correctly
but I have so many Patterns that I was thinking to create a file for them I have 10 words so each of them when compared with others will mean I have 100 patterns.
ideally I want to delete the words which are around the pattern as well so I would life to have a list which will be
We need more information than 'my patterns', we need examples of what you consider to be a pattern and what you expect it to match in your data in order to help you. The things you show with the * may be valid patterns, I cannot tell.
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
First, I apologize for my 'noobness' with Linux and the shell. I'm running Ubuntu with zsh as my shell.
What I'd like to be able to do is clean up a messy Downloads folder by moving categories of files to different directories with something like:
mv dir/$vids dest
mv dir/$music dest
mv... (5 Replies)
Hi all.
I have a .txt file that I need to sort it
My file is like:
1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO)
2- ... (10 Replies)
I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this:
$ look "string" "/home/patrick/filename.txt"
However, this gives me the following message:
"look: /home/patrick/filename.txt: File too large"
So, I have two... (14 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi,
I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)