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
SYSTEMD-FSTAB-GENERATOR(8)				      systemd-fstab-generator					SYSTEMD-FSTAB-GENERATOR(8)

NAME
systemd-fstab-generator - Unit generator for /etc/fstab SYNOPSIS
/usr/lib/systemd/system-generators/systemd-fstab-generator DESCRIPTION
systemd-fstab-generator is a generator that translates /etc/fstab (see fstab(5) for details) into native systemd units early at boot and when configuration of the system manager is reloaded. This will instantiate mount and swap units as necessary. The <term>passno</term> field is treated like a simlpe boolean, and the ordering information is discarded. However, the root filesystem is checked before all the other filesystems. See systemd.mount(5) and systemd.swap(5) for more information about special /etc/fstab mount options this generator understands. systemd-fstab-generator implements the generator specification[1]. KERNEL COMMAND LINE
systemd-fstab-generator understands the following kernel command line parameters: fstab=, rd.fstab= Takes a boolean argument. Defaults to "yes". If "no", causes the generator to ignore any mounts or swaps configured in /etc/fstab. rd.fstab= is honored only by initial RAM disk (initrd) while fstab= is honored by both the main system and the initrd. SEE ALSO
systemd(1), fstab(5), systemd.mount(5), systemd.swap(5), systemd-cryptsetup-generator(8) NOTES
1. generator specification http://www.freedesktop.org/wiki/Software/systemd/Generators systemd 208 SYSTEMD-FSTAB-GENERATOR(8)
All times are GMT -4. The time now is 11:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy