Sponsored Content
Full Discussion: ?* regular expression in sh
Top Forums Shell Programming and Scripting ?* regular expression in sh Post 302672899 by DavidMax on Tuesday 17th of July 2012 07:48:32 AM
Old 07-17-2012
Thanks,
I have just awared one minute before your post that above expressions are treated as shell metacharacters (after all I use it routinely to specify all files).

But what is a reason for which (as I have checked)

-

match in above string of metacharacters?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Regular Expression + Aritmetical Expression

Is it possible to combine a regular expression with a aritmetical expression? For example, taking a 8-numbers caracter sequece and casting each output of a grep, comparing to a constant. THX! (2 Replies)
Discussion started by: Z0mby
2 Replies

2. Programming

What does the regular expression ['(^[^~]+~).*'] mean?

What does the regular expression +~).*'] mean while using it with regexec.When the string "RCHNUSNT35C~rs07/ASM-RS07" is used with the regular expression +~).*'] regexec gives an error. I know what regexec does,but i do not understand what this expression means wrt to this string... any help... (2 Replies)
Discussion started by: anupamar
2 Replies

3. Linux

Regular expression to extract "y" from "abc/x.y.z" .... i need regular expression

Regular expression to extract "y" from "abc/x.y.z" (2 Replies)
Discussion started by: rag84dec
2 Replies

4. UNIX for Dummies Questions & Answers

ls with regular expression

I currently list and sort all the files in a directory which begin with an Upper Case C and end with the extension '#finished#'. Here is the command I use: ls -tr $currentDir/*.#finished# what i need to do now is list all the files in a directory that begin with upper case C and end... (3 Replies)
Discussion started by: rkgudde
3 Replies

5. Shell Programming and Scripting

Integer expression expected: with regular expression

CA_RELEASE has a value of 6. I need to check if that this is a numeric value. if not error. source $CA_VERSION_DATA if * ] then echo "CA_RELESE $CA_RELEASE is invalid" exit -1 fi + source /etc/ncgl/ca_version_data ++ CA_PRODUCT_ID=samxts ++ CA_RELEASE=6 ++ CA_WEEK_NO=7 ++... (3 Replies)
Discussion started by: ketkee1985
3 Replies

6. Programming

Perl: How to read from a file, do regular expression and then replace the found regular expression

Hi all, How am I read a file, find the match regular expression and overwrite to the same files. open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat"; open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat"; while (<DESTINATION_FILE>) { # print... (1 Reply)
Discussion started by: jessy83
1 Replies

7. UNIX for Advanced & Expert Users

sed: -e expression #1, char 0: no previous regular expression

Hello All, I'm trying to extract the lines between two consecutive elements of an array from a file. My array looks like: problem_arr=(PRS111 PRS213 PRS234) j=0 while } ] do k=`expr $j + 1` sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt ---some operation goes... (11 Replies)
Discussion started by: InduInduIndu
11 Replies

8. UNIX for Dummies Questions & Answers

Regular expression help

Hi, I am quite knew to scripting and I am trying to get a regular expression to work to check that a user enters a valid version number such as 1 or 1.1 or 12.3 etc. I dont seem to be able to get it to work as it picks up versions such as 1.......2. I only want it to work with a single dot.... (12 Replies)
Discussion started by: frodo61
12 Replies

9. Shell Programming and Scripting

Regular expression

Can someone please explain me what does this mean? ^{1,50}$ (1 Reply)
Discussion started by: Anupam_Halder
1 Replies

10. Shell Programming and Scripting

Regular expression

I would like to extract "JDBC Thin Client" from (PROGRAM=JDBC Thin Client); and "C:\Python26\python.exe" from (PROGRAM=C:\Python26\python.exe); "txm_v_awsrf_db.pr" from (PROGRAM=txm_v_awsrf_db.pr). if input line like "(PROGRAM=)", it return unknown. Would you help suggest a regular... (4 Replies)
Discussion started by: cstsang
4 Replies
BACKUP_ADDVOLENTRY(8)					       AFS Command Reference					     BACKUP_ADDVOLENTRY(8)

NAME
       backup_addvolentry - Defines a volume entry in a volume set

SYNOPSIS
       backup addvolentry -name <volume set name>
	   -server <machine name>
	   -partition <partition name>
	   -volumes <volume name (regular expression)>
	   [-localauth] [-cell <cell name>] [-help]

       backup addvole -n <volume set name>
	   -s <machine name>
	   -p <partition name>
	   -v <volume name (regular expression)>
	   [-l] [-c <cell name>] [-h]

DESCRIPTION
       The backup addvolentry command adds a volume entry definition to the existing volume set named by the -name argument. A volume entry
       definition can match one or more volumes, depending on the combination of the -server, -partition, and -volumes arguments.

       For the -server and -partition arguments, provide either

       o   The name of one machine or partition.

       o   The metacharacter expression .* (period and asterisk), which matches every machine name or partition name in the Volume Location
	   Database (VLDB).

       For the -volumes argument, specify a combination of alphanumeric characters and one or more metacharacters to wildcard part or all of the
       volume name. OPTIONS lists the acceptable metacharacters.

CAUTIONS
       It is best to issue this command in interactive mode. If issuing it at the shell prompt, enclose any strings containing metacharacters in
       double quotes, or escape the metacharacters with other delimiters, to prevent the shell from interpreting them. Adding volume entries to a
       temporary volume set is possible only within the interactive session in which the volume set was created.

OPTIONS
       -name <volume set name>
	   Names the volume set to which to add this volume entry definition.  The volume set must already exist (use the backup addvolset command
	   to create it).

       -server <machine name>
	   Defines the set of one or more file server machines that house the volumes in the volume entry. Provide either one fully-qualified
	   hostname (such as "fs1.abc.com") or the metacharacter expression ".*" (period and asterisk), which matches all machine names in the
	   VLDB.

       -partition <partition name>
	   Defines the set of one or more partitions that house the volumes in the volume entry. Provide either one complete partition name (such
	   as "/vicepa") or the metacharacter expression ".*" (period and asterisk), which matches all partition names.

       -volumes <volume name>
	   Defines the set of one or more volumes included in the volume entry. Specify the volumes by name, by using any combination of regular
	   alphanumeric characters and one or more of the following metacharacter expressions:

	   .   The period matches any single character.

	   *   The asterisk matches zero or more instances of the preceding character.	Combine it with any other alphanumeric character or
	       metacharacter.

	   [ ] Square brackets around a list of characters match a single instance of any of the characters, but no other characters; for example,
	       "[abc]" matches a single "a" or "b" or "c", but not "d" or "A". This expression can be combined with the asterisk.

	   ^   The caret, when used as the first character in a square-bracketed set, designates a match with any single character except the
	       characters that follow it; for example, "[^a]" matches any single character except lowercase "a". This expression can be combined
	       with the asterisk.

	      A backslash preceding any of the metacharacters in this list makes it match its literal value only. For example, the expression
	       "." (backslash and period) matches a single period, "*" a single asterisk, and "\" a single backslash.  Such expressions can be
	       combined with the asterisk (for example, ".*" matches any number of periods).

	   Perhaps the most common metacharacter expression is the period followed by an asterisk (".*"). This expression matches any string of
	   any length, because the period matches any character and the asterisk means any number of that character. As mentioned, it is the only
	   acceptable metacharacter expression for the -server and -partition arguments. In a volume definition it can stand alone (in which case
	   it matches every volume listed in the VLDB), or can combine with regular characters. The following example matches any volume name that
	   begins with the string "user" and ends with "backup":

	      user.*backup

       -localauth
	   Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The backup command interpreter presents it to
	   the Backup Server, Volume Server and VL Server during mutual authentication. Do not combine this flag with the -cell argument. For more
	   details, see backup(8).

       -cell <cell name>
	   Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see backup(8).

       -help
	   Prints the online help for this command. All other valid options are ignored.

EXAMPLES
       The following command adds a volume entry to the volume set called "sys". The entry matches all volumes on any machine or partition whose
       names begin with the string "sun4x_56" followed by a period:

	  backup> addvolentry sys .* .* sun4x_56..*

       The following command adds a volume entry to the volume set called "fs2", to match all volumes on the /vicepb partition of file server
       machine "fs2.abc.com". Because it is issued at the shell prompt, double quotes surround the metacharacters in the -volumes argument. (The
       command is shown here on two lines only for legibility reasons.)

	  % backup addvolentry -name fs2 -server fs2.abc.com 
			       -partition /vicepb -volumes ".*"

       The chapter in the OpenAFS Administration Guide about configuring the AFS Backup System presents additional examples as well as advice on
       grouping volumes.

PRIVILEGE REQUIRED
       The issuer must be listed in the /etc/openafs/server/UserList file on every machine where the Backup Server is running, or must be logged
       onto a server machine as the local superuser "root" if the -localauth flag is included.

SEE ALSO
       backup(8), backup_addvolset(8), backup_delvolentry(8), backup_delvolset(8), backup_listvolsets(8)

COPYRIGHT
       IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

       This documentation is covered by the IBM Public License Version 1.0.  It was converted from HTML to POD by software written by Chas
       Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.

OpenAFS 							    2012-03-26						     BACKUP_ADDVOLENTRY(8)
All times are GMT -4. The time now is 07:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy