Sponsored Content
Top Forums Shell Programming and Scripting why "aab" matchs "ab" when using reglar expression ? Post 302549085 by 915086731 on Sunday 21st of August 2011 10:07:24 AM
Old 08-21-2011
I see, substring also matchs. So I need to add \b besides 'ab' .
Thanks.
Code:
[saturn@saturn-pc new]$ [[ "aabaab" =~ aaa*b ]] && echo "ok" || echo "error"
ok             !!aabaab does not contain aaab, but it matchs, why?!!

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

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)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

3. Shell Programming and Scripting

cshell integer expression from "0000" to "1999"

I have 2000 files named like "file-fr0000.log", "file-fr1999.log"... I wanna generate the file names automatically in the following c shell script: set fr = 0 while ($fr <= 1999) grep "ENERGY" file-fr$fr.log > data.dat @ fr = ( $fr + 1 ) end The above will generate file names... (3 Replies)
Discussion started by: rockytodd
3 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

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)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

6. Solaris

The slices "usr", "opt", "tmp" disappeared!!! Help please.

The system don't boot. on the screen appears following: press enter to maintenance (or type CTRL-D to continue)...I checked with format command. ... the slices "0-root","1-swap","2-backup" exist. ...the slises "3-var","6-usr" -unassigned. :( (16 Replies)
Discussion started by: wolfgang
16 Replies

7. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

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)
Discussion started by: asjaiswal
2 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

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)
Discussion started by: jcdole
1 Replies

9. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

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)
Discussion started by: penchev
3 Replies
FvwmDragWell(1) 						   Fvwm Modules 						   FvwmDragWell(1)

NAME
FvwmDragWell - A XDND drag well SYNOPSIS
FvwmDragWell FvwmDragWell is a Xdnd drag well. The user sends the data and type to the drag well via a fvwm SendToModule command. The drag well indi- cates that it received the information via a crude animation. The user may then drag the information from the well to other applications that support the Xdnd standard. The fvwm module FvwmWharf accepts drops of type "text/uri-list". INITIALIZATION
During initialization, FvwmDragWell gets config info from fvwm's module configuration database (see fvwm(1), section MODULE COMMANDS). If the FvwmDragWell executable is linked to another name, i.e. ln -s FvwmDragWell OtherDragWell, then another module called OtherDragWell can be started, with a completely different configuration than FvwmDragWell, simply by changing the keyword FvwmDragWell to OtherDragWell. This way multiple FvwmDragWell programs may be used. USE
Data is sent to the module from fvwm using the SendToModule Command. The form of the send to module command is: SendToModule modulename dragtype type-string, dragdata data type-string is a quoted string that declares the type of "data" and how the data will be exported. The "typestring" string is converted to an XAtom. The user should use standard Mime type strings, all in lower case. Note that the module does no data conversion. There is one exception to the above format. If the datatype string is omitted, the module assumes that the user is passing a file or directory path. In this case, the string "file://$hostname/" is prepended to the data, and the data is exported as type "text/uri-list". Examples: SendToModule FvwmDragWell dragdata /usr/local/libexec/fvwm/2.4.0 On hostname saturn, the drag well will convert the data to "file://saturn/usr/local/libexec/fvwm/2.4.0" and will export the data as type "text/uri-list". The long form of this command would be SendToModule FvwmDragWell dragtype text/uri-list, dragdata file://saturn/usr/local/libexec/fvwm/2.3.8 INVOCATION
FvwmDragWell must be invoked from fvwm, so no command line invocation will work. CONFIGURATION OPTIONS
FvwmDragWell reads the same .fvwm2rc file as fvwm reads when it starts up, and looks for certain configuration options: *FvwmDragWell: Geometry geometry Completely or partially specifies the Fvwm window location and geometry, in standard X11 notation. The default size is 48x48. *FvwmDragWell: DragWellGeometry geometry Specifies the geometry of the drag box in the FvwmDragWell window, in the standard X11 notation. Default is 30x30+9+9 *FvwmDragWell: Colorset colorset The colorset is used for the background and shading of the drag well. See the man page of FvwmTheme for a description of colorsets. *FvwmDragWell: Fore Color The foreground color. The default foreground color is grey60. *FvwmDragWell: Back Color The background color. The default background color is black. *FvwmDragWell: Shadow Color The shadow color of the button relief. The default foreground relief color is grey20. *FvwmDragWell: Hilite Color The hilight color of the button relief. The default background relief color is grey90. BUGS
CREDITS and COPYRIGHTS The concept for interfacing this module to the Window Manager by Robert Nation. No guarantees or warranties or anything are provided or implied in any way whatsoever. Use this program at your own risk. Permission to use this program for any purpose is given, as long as the copyright is kept intact. 3rd Berkeley Distribution 7 May 208 (2.5.26) FvwmDragWell(1)
All times are GMT -4. The time now is 04:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy