The pattern within /PAT/ cannot include variables. The spacebar fixed pattern is one solution. A more general solution, exactly the way you want it, is as follows:
hello
I want to do a pattern match for string in the if statement, but I am not sure how to use regex inside the if statement.
I am looking for something like this:
if {2,3} ]; then
.....
....
...
fi (7 Replies)
Hi!
I want to made a program that will generate code like this:
{{Navedi XYZ
|avtor=XYZ1
|naslov=XYZ2
|leto_izzida=XYZ3
|zalozba=XYZ4
|kraj=XYZ5
|isbn=XYZ6
|cobiss_id=XYZ7
}}
from input like this:
<b> ODGOVORNOST............. : <a... (5 Replies)
Hi,
I'm trying to write a routine to parse a file that contains data that will be read
into arrays. The file is composed of labels to identify data types and arbitrary
lines of data with the usual remarks and empty new lines as is common with
config files.
The initial pass is built as so:... (3 Replies)
hi everyone
suppose my input file is
ABC-12345
ABCD-12345
BCD-123456
i want to search the specific pattern which looks like
-
in a file so i used this command
cat $file | awk ' { if ($0 ~ /-/) { print } }'
so it gives me the result as
ABCD-12345
BCD-12345
BCD-12345
... (31 Replies)
Hi can you suggest in this regard
The sample.txt conatins the data
name lines type
sam 12 txt
sam 24 xls
sam 36 pdf
ram 32 txt
ram 45 sxls
ram 58 word
sam 92 jpeg
sam 21 gif
sam 22 ltf
from the data i need to sum all line... (5 Replies)
Hi all,
Can someone tell me what's the (g)awk equal of this simple regex to find ip addresses in urls:
egrep "^http://{1,3}\.{1,3}\.{1,3}\.{1,3}(:{1,5})?/"Input:
http://10.0.0.1/query.exe
http://11y10x09w:80/howaboutme
http://192.168.100.190:1234/takeme.gpg
Output:... (8 Replies)
I am having issues escaping special characters in my AWK script as follows:
for id in `cat file`
do
grep $id in file2 | awk '\
BEGIN {var=""} \
{ if ( /stringwith+'|'+'50'chars/ ) {
echo "do this"
} else if ( /anotherString/ ) {
echo "do that"
} else {
... (4 Replies)
push @MACARRAY, "$+{catalog} $+{machine}\n" if ($info =~ /(?<catalog>catalog).+?(?<machine>\*+)/ms);
I am (still) trying to solve problem. Looking around on the server I found this piece of code. Specifically what does "$+{catalog} $+{machine}\n"
do ?
Thanks in advance (1 Reply)
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
LEARN ABOUT DEBIAN
xpat
XPAT(1) ALLIANCE Reference Manual XPAT(1)NAME
xpat - graphic pattern viewer
SYNOPSIS
xpat [-l file_name] [-xor] [-install] [-force]
ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in
Paris, France.
Web : http://asim.lip6.fr/recherche/alliance/
E-mail : alliance-users@asim.lip6.fr
DESCRIPTION
Xpat is a pattern viewer. All functionnalities can be accessed through different menus. Xpat works under Motif and X11r6. When entering
Xpat, the main window appears and shows 5 different menus on the top bar. These menus can be entered by simply clicking on the mouse left
button. Here is the description of these menus.
File Open : load an existing pattern file (see pat(5)).
Quit : quit xpat.
Edit Identify : identify a selected pattern.
Connected : highlight a selected pattern.
Search : search a pattern.
View Zoom : perform zoom in, zoom out, center, fit, refresh on figure.
Layer : select types of layers displayed.
Map : show cursor position in the entire figure.
Arrows : show arrows for moving at the grid step.
Grid : Set the X,Y step of the grid if displayed.
Tools Message : display the last error messages
Setup Save or load a user defined configuration of default displayed menus.
SPECIAL KEYS
+/- Increase or decrease the time scale.
OPTIONS -l file_name
Load the pattern file file_name (without extention .pat)
-xor Two graphic cursor methods can be used, invert or xor.
-force this option force all graphical objects to be displayed.
-install
Switch to a private color map.
ENVIRONMENT VARIABLES
MBK_WORK_LIB
indicates the path to the read directory for the session.
XPAT_PARAM_NAME (optionnal)
indicates the path to the parameter file used by Xpat.
SEE ALSO
mbk(1), MBK_WORK_LIB(1), PAT(5), asimut(1)BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory.
We need your feedback to improve documentation and tools.
ASIM /LIP6 September 1, 2000 XPAT(1)