09-24-2017
That's not a back reference, but one on the
s command's flags following the replacement.
info sed:
Quote:
FLAGS:
'g'__________Apply the replacement to _all_ matches to the REGEXP, not just the first.
'NUMBER' __Only replace the NUMBERth match of the REGEXP.
Last edited by RudiC; 09-24-2017 at 07:48 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file which looks like this, I have stripped most of the columns:
2006,UCA,"02452","NM","1","M","84",123,aa
2006,UCA,"02452","NM","1","L","84",123,bb
2006,UCA,"02452","NM","1","L","84",432,cc
2006,UCA,"02452","NM","1","L","33",213,dd
2006,UCA,"02452","NM","1","L","33",124,ee... (3 Replies)
Discussion started by: sumeet
3 Replies
2. Shell Programming and Scripting
Hi i have a file with follw data
"20090427","0","","16371311","-100200","","","","16371311","JUL","09"
In the 10th column i need to convert the month name into month number in this case JUL will be 7 and append the 10th and 11th column which shows me the output as 709. Can you suggest a shell... (11 Replies)
Discussion started by: vee789
11 Replies
3. Shell Programming and Scripting
file1
----
34556745
32678343
31576776
31455566
21356666
I want to assign the record values to a variable in the below format, so that I can use output in .sql file for querying in database.
('34556745', '32678343', '31576776', '31455566', '21356666')
-----------
below is the... (11 Replies)
Discussion started by: rajivrsk
11 Replies
4. UNIX for Dummies Questions & Answers
Hi! Is there a way to append column and row header to a file in awk script.
For example if I have
Jane F 39 manager
Carlos M 40 system administrator
Sam F 20 programmer
and I want it to be
# name gend age occup
1 Jane F 39 manager
2 Carlos M ... (4 Replies)
Discussion started by: FUTURE_EINSTEIN
4 Replies
5. Shell Programming and Scripting
Hi,
Trying to change the prompt. I have the following code.
export PS1='
<${USER}@`hostname -s`>$ '
The hostname is not displayed
<abc@`hostname -s`>$ uname -a
AIX xyz 1 6 00F736154C00
<adcwl4h@`hostname -s`>$
If I use double quotes, then the hostname is printed properly but... (3 Replies)
Discussion started by: bobbygsk
3 Replies
6. Shell Programming and Scripting
i have data as below
123,"paul phiri",paul@yahoo.com,"po.box 23, BT","Eco Bank,Blantyre,Malawi"
i need an output to be
123,"paul phiri",paul@yahoo.com,"po.box 23 BT","Eco Bank Blantyre Malawi" (5 Replies)
Discussion started by: mathias23
5 Replies
7. Shell Programming and Scripting
I have a text file where each field is enclosed in double quotes and separated by a comma.
But in certain rows we have embedded double quotes within column data
For e.g
"""TRUSPICE CENTRE"" CLAYTON AU"
The above value is for a single column but there are embedded quotes within... (2 Replies)
Discussion started by: abhilashnair
2 Replies
8. Shell Programming and Scripting
Hi All,
I'm unable to load the data using sql loader where there are double quotes within the double quotes As these are optionally enclosed by double quotes.
Sample Data :
"221100",138.00,"D","0019/1477","44012075","49938","49938/15043000","Television - 22" Refurbished - Airwave","Supply... (6 Replies)
Discussion started by: mlavanya
6 Replies
9. Shell Programming and Scripting
Please help me to get required output for both scenario 1 and scenario 2 and need separate code for both scenario 1 and scenario 2
Scenario 1
i need to do below changes only when column1 is CR and column3 has duplicates rows/values. This inputfile can contain 100 of this duplicated rows of... (1 Reply)
Discussion started by: as7951
1 Replies
10. UNIX for Beginners Questions & Answers
Source Code of the original script is down below please run the script and try to solve this problem
this is my data and I want it column wise
2019-03-20 13:00:00:000
2019-03-20 15:00:00:000
1
Operating System
LAB
0
1
1
1
1
1
1
1
1
1
0
1 (5 Replies)
Discussion started by: Shubham1182
5 Replies
LEARN ABOUT DEBIAN
svn::hooks::denyfilenames
SVN::Hooks::DenyFilenames(3pm) User Contributed Perl Documentation SVN::Hooks::DenyFilenames(3pm)
NAME
SVN::Hooks::DenyFilenames - Deny some file names.
VERSION
version 1.19
SYNOPSIS
This SVN::Hooks plugin is used to disallow the addition of some file names.
It's active in the "pre-commit" hook.
It's configured by the following directives.
DENY_FILENAMES(REGEXP, [REGEXP => MESSAGE], ...)
This directive denies the addition of new files matching the Regexps passed as arguments. If any file or directory added in the commit
matches one of the specified Regexps the commit is aborted with an error message telling about every denied file.
The arguments may be compiled Regexps or two-element arrays consisting of a compiled Regexp and a specific error message. If a file matches
one of the lone Regexps an error message like this is produced:
DENY_FILENAMES: filename not allowed: filename
If a file matches a Regexp associated with an error message, the specified error message is substituted for the 'filename not allowed'
default.
Note that this directive specifies a default restriction. If there are any DENY_FILENAMES_PER_PATH directives (see below) being used, this
one is only used for files that don't match any specific rules there.
Example:
DENY_FILENAMES(
qr/.(doc|xls|ppt)$/i, # ODF only, please
[qr/.(exe|zip|jar)/i => 'No binaries, please!'],
);
DENY_FILENAMES_PER_PATH(REGEXP => REGEXP, REGEXP => [REGEXP => MESSAGE], ...)
This directive is more specific than the DENY_FILENAMES, because it allows one to specify different restrictions in different regions of
the repository tree.
Its arguments are a sequence of rules, each one consisting of a pair. The first element of each pair is a regular expression specifying
where in the repository this rule applies. It applies if any file being added matches the regexp. The second element specifies the
restrictions that should be imposed, just like the arguments to DENY_FILENAMES.
The first rule matching an added file is used to check it. The following rules aren't tried.
Only if no rules match a particular file will the restrictions defined by DENY_FILENAMES be imposed.
Example:
DENY_FILENAMES_PER_PATH(
qr:/src/: => [qr/[^w.-]/ => 'source files must be strict'],
qr:/doc/: => qr/[^ws.-]/i, # document files allow spaces too.
qr:/notes/: => qr/^$/, # notes directory allows anything.
);
AUTHOR
Gustavo L. de M. Chaves <gnustavo@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by CPqD.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-24 SVN::Hooks::DenyFilenames(3pm)