Sponsored Content
Full Discussion: PCRE negative lookahead
Top Forums Shell Programming and Scripting PCRE negative lookahead Post 302486892 by Scrutinizer on Monday 10th of January 2011 03:33:27 PM
Old 01-10-2011
Why not just use:
Code:
grep -v /home /etc/fstab

( or pcregrep -v /home /etc/fstab )

--
With negative lookahead try:
Code:
pcregrep '^(?!.*/home)' etc/fstab


Last edited by Scrutinizer; 01-10-2011 at 04:51 PM..
 

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PCRE string questions.

What is the string that would satisfy this expression: "^gs{3}$" ? What is an expression that would satisfy all these strings: csafaq.exe, csafbc.exe, asdfcd.exe? Also, To catch these files, : gdnus1862.exe gdnus10.exe gdnus250.exe gdnus2337.exe I am using this regex. :... (2 Replies)
Discussion started by: komputersman
2 Replies

2. Shell Programming and Scripting

Sendmail K command regex: adding exclusion/negative lookahead to regex -a@MATCH

I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works: LOCAL_CONFIG # Kcheckaddress regex -a@MATCH +<@+?\.++?\.(us|info|to|br|bid|cn|ru) LOCAL_RULESETS SLocal_check_mail # check address against various regex... (0 Replies)
Discussion started by: RobbieTheK
0 Replies

3. UNIX for Advanced & Expert Users

Postfix - pcre

Hello. I need to test valid sender address. I have created a rule in main.cf : smtpd_sender_login_maps = pcre:/etc/postfix/sender_login_maps.pcre smtpd_sender_restrictions = reject_non_fqdn_sender, reject_unknown_sender_domain, reject_sender_login_mismatch THe file... (1 Reply)
Discussion started by: jcdole
1 Replies
QUOTAON(8)						    BSD System Manager's Manual 						QUOTAON(8)

NAME
quotaon, quotaoff -- turn filesystem quotas on and off SYNOPSIS
quotaon [-g] [-u] [-v] filesystem ... quotaon [-g] [-u] [-v] -a quotaoff [-g] [-u] [-v] filesystem ... quotaoff [-g] [-u] [-v] -a DESCRIPTION
quotaon announces to the system that disk quotas should be enabled on one or more filesystems. quotaoff announces to the system that the specified filesystems should have any disk quotas turned off. The filesystems specified must have entries in /etc/fstab and be mounted. quotaon expects each filesystem to have quota files named quota.user and quota.group which are located at the root of the associated file system. These defaults may be overridden in /etc/fstab. By default both user and group quotas are enabled. Available options: -a If the -a flag is supplied in place of any filesystem names, quotaon/quotaoff will enable/disable all the filesystems indicated in /etc/fstab to be read-write with disk quotas. By default only the types of quotas listed in /etc/fstab are enabled. -g Only group quotas listed in /etc/fstab should be enabled/disabled. -u Only user quotas listed in /etc/fstab should be enabled/disabled. -v Causes quotaon and quotaoff to print a message for each filesystem where quotas are turned on or off. Specifying both -g and -u is equivalent to the default. FILES
quota.user at the filesystem root with user quotas quota.group at the filesystem root with group quotas /etc/fstab filesystem table SEE ALSO
quota(1), libquota(3), fstab(5), edquota(8), quotacheck(8), repquota(8) HISTORY
The quotaon command appeared in 4.2BSD. BSD
December 11, 1993 BSD
All times are GMT -4. The time now is 07:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy