perl - how do i find out if a file doesn't contain a pattern?
how do i check a file for a pattern and perform an action if it doesn't exist?
i know how to search a file for a pattern. you just place it in an array like so.
however, if you want to find out if a pattern doesn't exist, the search will always be true because each line is read separately and not all lines in the file contain the pattern.
how do search the whole file for the non-existence of the pattern?
Hi all,
I just learnt Perl and I encountered a problem in my current project.
For a verilog file, i am required to write a PERL script that could match pattern to output nitrolink and nitropack. I wont know what name to grep except the pattern below.
the verilog file:
nitrolink nitrolink... (1 Reply)
hi all
i have a file in my box, which is so huge and full file is in a single line.
In this file i have to look for a pattern "ABC01234567"
In this above mentioned pattern ABC is fixed and number might change . it will a eight digit random number
Thanks so much for all you help
... (1 Reply)
Hi,
I would like to find a pattern in a file as follows:
I would like to find "or" "OR" "and" "AND" between two numeric values.
I have tried this:
grep '**or*'
But does not work.
Appreciate help on this. (4 Replies)
Hi Gurus,
I have a file like below.. I have to match each with predefined pattern. If matches then have to write the entire record to a separate file. If not make the value as NULL and write the entire record into another file.
| is the delimiter
ravi123|2344|M
R123Vi|2345|F... (8 Replies)
Hi,
Need your help in this.
I have an input file that has multiple enrollment_number, somewhat like
1234567
8901234
9856321
6732187
7623465
Now i have to search and delete these enrollment_number recursively from all the files that are within multiple sub-directories of a... (10 Replies)
Hi All,
I have a file PSU_ 20130805_201308041234522
i want to search this file where variable day=20130805 and curday=20130804
after currday date some numbers will be added.how to search this file by using day and curday.
Thanks in advance. (3 Replies)
I need assistance with following requirement, I am new to Unix.
I want to do the following task but stuck with file creation date(sysdate)
Following is the requirement
I need to create a script that will read the abc/xyz/klm folder and look for *.err files for that day’s date and then send an... (4 Replies)
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies
LEARN ABOUT X11R4
fc-pattern
FC-PATTERN(1)FC-PATTERN(1)NAME
fc-pattern - parse and show pattern
SYNOPSIS
fc-pattern [ -cdVh ] [ --config ] [ --default ] [ -f format | --format format ] [ --version ] [ --help ]
[ pattern [ element ... ] ]
DESCRIPTION
fc-pattern parses pattern (empty pattern by default) and shows the parsed result. If --config is given, config substitution is performed
on the pattern before being displayed. If --default is given, default substitution is performed on the pattern before being displayed.
If any elements are specified, only those are printed.
OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included
below.
-c --config
Perform config substitution on pattern.
-d --default
Perform default substitution on pattern.
-f --format format
Format output according to the format specifier format.
-V --version
Show version of the program and exit.
-h --help
Show summary of options.
pattern
Parses and displays pattern (uses empty pattern by default).
element
If set, the element property is displayed for parsed pattern.
SEE ALSO FcNameParse(3)FcConfigSubstitute(3)FcDefaultSubstitute(3)FcPatternPrint(3)FcPatternFormat(3)fc-cat(1)fc-cache(1)fc-list(1) fc-
match(1)fc-query(1)fc-scan(1)
The fontconfig user's guide, in HTML format: /usr/share/doc/fontconfig/fontconfig-user.html.
AUTHOR
This manual page was updated by Behdad Esfahbod <behdad@behdad.org>.
16 April 2012 FC-PATTERN(1)