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)
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT PHP
aggregate_methods_by_regexp
AGGREGATE_METHODS_BY_REGEXP(3) 1 AGGREGATE_METHODS_BY_REGEXP(3)aggregate_methods_by_regexp - Selective class methods aggregation to an object using a regular expressionSYNOPSIS
void aggregate_methods_by_regexp (object $object, string $class_name, string $regexp, [bool $exclude = false])
DESCRIPTION
Aggregates methods from a class to an existing object using a regular expression to match 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 $regexp
-
o $exclude
- The optional parameter $exclude is used to decide whether the regular expression will select 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_list(3), aggregate_properties(3), aggregate_proper-
ties_by_list(3), aggregate_properties_by_regexp(3), deaggregate(3).
PHP Documentation Group AGGREGATE_METHODS_BY_REGEXP(3)