Sponsored Content
Top Forums Shell Programming and Scripting comment a line of the patterns is a the beginning of the line Post 302692155 by elixir_sinari on Monday 27th of August 2012 07:59:22 AM
Old 08-27-2012
Quote:
Originally Posted by sathyaonnuix
Ah how i read it incorrectly.. Hope this works..

sed 's/\(exclude\)/#\1/g;s/\(exclude=\)/#\1/g'

@Elixir: Am on my mobile.. couldn't try..
That will not work either.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix Script with line number at beginning of each line.

Could anybody help me. I need to create a script that reads a text file from STDIN and prints out the file to STDOUT with line numbers at the beginning of each line. Thanks. (5 Replies)
Discussion started by: mascorro
5 Replies

2. Shell Programming and Scripting

Placing a comment at the beginning of a line

Hello - I am running Linux. I want to place a comment char at the beginning of a line in a file. For example: testvar=`grep username /etc/people sed -e 's/$testvar/#$testvar/g' /etc/people I cannot get the above commands to put a comment at the beginning of the line. Any... (3 Replies)
Discussion started by: mlike
3 Replies

3. UNIX for Dummies Questions & Answers

how to replace a text of line with a comment line

I want to replace this line : "test compare visible] true" and make it "#test compare visible] true". How can I do it ? And it should be checked in many sub folder files also. (6 Replies)
Discussion started by: manoj.b
6 Replies

4. Shell Programming and Scripting

How To comment a line where a word exists

Hi All Can u help me.. My problem is comment (#) a line where a word exists in that line sample: cat /tmp/file.txt monitor 192.168.1.11 Copying files in current directory 1 monitor 192.168.1.1 Copying files in current directory 2 monitor 192.168.1.12 Copying files in current... (2 Replies)
Discussion started by: darren_j
2 Replies

5. Shell Programming and Scripting

Comment a line with SED

I have around 25 hosts and each hosts has 4 instance of jboss and 4 different ip attached to it . I need to make some changes to the startup scripts. Any tips appreciated. I have total of 100 instances which bind to 100 different ip address based on instance name. For example File1 ... (1 Reply)
Discussion started by: gubbu
1 Replies

6. UNIX for Dummies Questions & Answers

How to specify beginning-of-line/end-of-line characters inside a regex range

How can I specify special meaning characters like ^ or $ inside a regex range. e.g Suppose I want to search for a string that either starts with '|' character or begins with start-of-line character. I tried the following but it does not work: sed 's/\(\)/<do something here>/g' file1 ... (3 Replies)
Discussion started by: jawsnnn
3 Replies

7. UNIX for Dummies Questions & Answers

vim copy line and paste at the beginning, middle, and end of another line

How would you do vim copy line and paste at the beginning, middle, and end of another line. I know yy copies the whole line and p pastes the whole line, but on its own separate line. Sometimes I would like to copy a line to the beginning, middle, or end of another line. I would think this would be... (3 Replies)
Discussion started by: cokedude
3 Replies

8. Shell Programming and Scripting

beginning less from line #

Hi from a script i want to to read a file beginning at line e.g. number 21 to the EOF. less +n21 temp.txt Bevor the result, it brings an empty page, so that i cant use for scripting. Any idea how the problem can be solved? Thanks in advance! IMPe (2 Replies)
Discussion started by: IMPe
2 Replies

9. Shell Programming and Scripting

How to comment a specific line of a file?

Hi, I need to comment out (insert # in the front of a line) a line that has entry Defaults requiretty using command-line as I need to do this on hundreds of servers. From Defaults requiretty To #Defaults requiretty I tried something like below but no luck: Please advise,... (3 Replies)
Discussion started by: prvnrk
3 Replies

10. Shell Programming and Scripting

Find matched patterns and print them with other patterns not the whole line

Hi, I am trying to extract some patterns from a line. The input file is space delimited and i could not use column to get value after "IN" or "OUT" patterns as there could be multiple white spaces before the next digits that i need to print in the output file . I need to print 3 patterns in a... (3 Replies)
Discussion started by: redse171
3 Replies
AGGREGATE_METHODS_BY_LIST(3)						 1					      AGGREGATE_METHODS_BY_LIST(3)

aggregate_methods_by_list - Selective dynamic class methods aggregation to an object

SYNOPSIS
void aggregate_methods_by_list (object $object, string $class_name, array $methods_list, [bool $exclude = false]) DESCRIPTION
Aggregates methods from a class to an existing object using a list of method names. The class constructor or methods whose names start with an underscore character (_), which are considered private to the aggregated class, are always excluded. PARAMETERS
o $object - o $class_name - o $methods_list - o $exclude - The optional parameter $exclude is used to decide whether the list contains the names of methods to include in the aggregation (i.e. $exclude is FALSE), or to exclude from the aggregation ($exclude is TRUE). RETURN VALUES
No value is returned. SEE ALSO
aggregate(3), aggregate_info(3), aggregate_methods(3), aggregate_methods_by_regexp(3), aggregate_properties(3), aggregate_proper- ties_by_list(3), aggregate_properties_by_regexp(3), deaggregate(3). PHP Documentation Group AGGREGATE_METHODS_BY_LIST(3)
All times are GMT -4. The time now is 07:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy