Sponsored Content
Top Forums UNIX for Advanced & Expert Users grep for a backslash question Post 302544734 by fpmurphy on Thursday 4th of August 2011 09:25:02 PM
Old 08-04-2011
Quote:
So single quotes take you literally and double quotes keep their special meaning?
Essentially yes. Expansion does not happen within single quotes but does within double quotes.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep question

I'm using grep in a shell and I was wondering: Can I grep a file and then delete all files that contain what it returns? So instead of grep 'blah' * and I have 50 files that have blah in it and I would have to delete all 50 manually, how would I just delete them all in one fell swoop? (3 Replies)
Discussion started by: tphegley
3 Replies

2. UNIX for Dummies Questions & Answers

Question about GREP

I have 2 files, in one file is a list of hex numbers, the other is what i need matched. Is it possible for me to specify to grep the list and have it go through the second file for each item in the list in the first file to match the lines? so this is like a cross-refference. (16 Replies)
Discussion started by: Adriel
16 Replies

3. UNIX for Dummies Questions & Answers

grep -f question

when using grep -f file1 file2 if you have multiple entries in the pattern file1 that are the same will it take the line out of file2 that matches file1 each time it comes up? if not by default can you set a flag to make this possible? or another way - can you get it to search for and match the... (8 Replies)
Discussion started by: Adriel
8 Replies

4. Shell Programming and Scripting

How ro handle backslash character in grep?

Hi , I am doing invert grep using -v but the string contain "/" which break the grep command and it do not skip the lines with "/" on it. Diffu.txt ======== 1159c1159 < <td align="right" valign="middle" class="paddingRight2px" id="featureListItemChannelButton7466"> --- > <td... (1 Reply)
Discussion started by: rajbal
1 Replies

5. UNIX for Advanced & Expert Users

How to handle backslash in grep string

Hi , I am doing invert grep using -v but the string contain "/" which break the grep command and it do not skip the lines with "/" on it. Diffu.txt ======== 1159c1159 < <td align="right" valign="middle" class="paddingRight2px" id="featureListItemChannelButton7466"> --- > <td... (6 Replies)
Discussion started by: rajbal
6 Replies

6. UNIX for Dummies Questions & Answers

grep question

I wanted to search a for all lines containing ERROR but not errors that contained the word "foo" (for example). The only way I could figure out to do it was: grep ERROR myfile.log | grep -v foo is there a way to do this with one grep command instead of two? One grep is faster than two,... (4 Replies)
Discussion started by: tim-bobby
4 Replies

7. UNIX for Dummies Questions & Answers

grep question

Instead of using the following command #dmesg | grep -v sendmail | grep -v xntpd How can I use just one grep -v and give both arguments. Please suggest thanks (4 Replies)
Discussion started by: Tirmazi
4 Replies

8. UNIX for Dummies Questions & Answers

Grep Question..

I am grepping a log file but want to filter out more than one thing.. tail -f log | grep -vi "FTP session" How can I add more filters to this string? Can I do tail -f log | grep -vi "FTP session" | grep -vi "xxx" or is there a better method. Thanks Use code tags please, ty. (7 Replies)
Discussion started by: NelsonC
7 Replies

9. UNIX for Dummies Questions & Answers

grep for a backslash as for loop parameter

Hello everyone, My main objective is to search for text within a file, namely a block of text where each line ends with a backslash "\". However, the block must begin with a keyword, like "loginstring". Here is an example of a file that contains a block: ############### loginstring \... (2 Replies)
Discussion started by: idlechatter
2 Replies

10. UNIX for Dummies Questions & Answers

Grep Question

My grep returns a row of data like this: 75=20130130;60=074338;61=985;511=55473883;452=115439;62=196;267=1; Is there a way for the grep to only return 60="something" and 511="something" ? Thanks in advance. (10 Replies)
Discussion started by: Carl2013
10 Replies
Perl::Critic::Policy::Variables::ProhibitPerl4PackageNamUser)Contributed Perl DocumenPerl::Critic::Policy::Variables::ProhibitPerl4PackageNames(3)

NAME
Perl::Critic::Policy::Variables::ProhibitPerl4PackageNames - Use double colon (::) to separate package name components instead of single quotes ('). AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Perl 5 kept single quotes ("'") as package component separators in order to remain backward compatible with prior "perl"s, but advocated using double colon ("::") instead. In the more than a decade since Perl 5, double colons have been overwhelmingly adopted and most people are not even aware that the single quote can be used in this manner. So, unless you're trying to obfuscate your code, don't use them. package Foo::Bar::Baz; #ok package Foo'Bar'Baz; #not ok CONFIGURATION
This Policy is not configurable except for the standard options. SEE ALSO
perlmod AUTHOR
Elliot Shank "<perl@galumph.com>" COPYRIGHT
Copyright (c) 2007-2011 Elliot Shank. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.16.3 2014-06-09 Perl::Critic::Policy::Variables::ProhibitPerl4PackageNames(3)
All times are GMT -4. The time now is 06:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy