How does one do a search for a multiline regular experssion and output the results to a file.
I know this won't work since grep only searches single lines:
egrep '<a>.*?</a>' source.xml > output.xml
Here are some sample patterns I'd like to match and output to a single file:
... (4 Replies)
I am writing script that can run on solaris 10, Linux Fedora and windows taht has cybwin installed.
I want to display a variable containing muli-line text.
using echo command, the variable display all rows in single line i.e. it loses the format.
Is there any other command that displays... (2 Replies)
I have a data of the form
0.0117843924 0. 0. 0. 0.
0.011036017 0. 0. 0. 0.
0.0103351669 0. 0. 0. 0.
4839.41211 0. 0. 0. 0.
4532.08203 0. 0. 0. 0.
I would like to insert a couple of blank lines before the 4839 line, every time it appears. The numbers in the... (2 Replies)
Hi,
I have a file of the following from:
Afghanistan
gdpcapit|800
Akrotiri
Albania
gdpcapit|6000
now I want have the gdpcapit value next to the country when there is one like this:
Afghanistan 800
gdpcapit|800
Akrotiri
Albania 6000
gdpcapit|6000
How do I do this? I've... (4 Replies)
My shell is csh and it is required.
I have a file like sample.txt
------------------------
a b c
d
e
f
g h i
------------------------
I want set the file to a variable and print it out in the same format.
I have tried something like this, but not succed.
% cat ~/tmp/sample.txt
a b c
d... (8 Replies)
Hey everyone, I'm new to sed and I need to create a script for inserting one line of code at the beginning of every method in a Xcode project (over 6,000 methods). Each method Structure is
(+ or -) (Various declarations-- could span multiple lines) ({)
I've tried for days, any guidance would be... (2 Replies)
Experts,
I am novice unix user. At my work, most of our DBA's work on creating DDL's to create new tables in production. At every week we need to validate the scripts (do peer review) and it takes a while and also it is not effective when we have like 150 tables created in the scripts. I am... (3 Replies)
Hi
We have a database export file which needs to be formatted as below
InputCreate view ABC1 as Locking ABC1
for Access select * from PQR
Create view ABC2 as Locking
ABC2 for access
select * from PQR
Create view ABC3
as Locking ABC3
for
Access
select * from PQR
OutputCreate... (5 Replies)
Hi guys,
I am fairly comfortable with using the sed command if the string to be replaced is all on a single line.
I was wondering is it possible to use sed command in a multiline way ?
Say for example I have the below string on 2 different lines:
{
"key": "brandNameA",
... (3 Replies)
Discussion started by: Junaid Subhani
3 Replies
LEARN ABOUT OSF1
cdc
cdc(1) General Commands Manual cdc(1)NAME
cdc - Changes the comments in a Source Code Control System (SCCS) delta
SYNOPSIS
cdc -rSID [-m] [MRlist] [-y] [comment] file...
cdc -rSID -mMRlist -ycomment -
The cdc command changes the Modification Requests (MRs) and comments for the SID specified by the -r option for each named Source Code Con-
trol System (SCCS) file.
OPTIONS
Supplies a list of MR numbers for cdc to add or delete in the SID specified by the -r option. You can use this option only if the file has
the v header flag set (see the admin command). A null MR list has no effect.
In MRlist, MRs are separated by spaces, tab characters, or both. To delete an MR, precede the MR number with an ! (exclamation
point). If the MR you want to delete is currently in the list of MRs, it is changed into a comment line. The cdc command places a
list of all deleted MRs in the comment section of the delta and precedes them with a comment line, indicating that the following MRs
were deleted.
If you do not specify the -m option, and the v header flag is set, MRs are read from standard input. If standard input is a termi-
nal, the cdc command prompts you for the MRs. The first newline character not preceded by a (backslash) ends the list on the com-
mand line. The cdc command continues to take input until it reads an End-of-File character or a blank line. MRs are always read
before comments (see the -y option). If the v flag has a value, cdc interprets the value as the name of a program that validates
the MR numbers. If the MR number validation program returns a nonzero exit value, the cdc command stops and does not change the
MRs. Specifies the SCCS identification number of the delta for which cdc will change the comments or MRs. Specifies text to
replace any comment already existing for the delta specified by the -r option. The cdc command keeps the existing comments and pre-
cedes them by a comment line, stating that they were changed. A null comment has no effect.
If you do not specify -y, the cdc command reads comments from standard input until it reads an End-of-File character. If the stan-
dard input is a terminal, the cdc command prompts for the comments and also allows a blank line to end input. If the last character
of a line is a (backslash), the cdc command ignores it and continues to read standard input.
If cdc reads standard input for file names (that is, when you specify a file name of - (dash)), you must use the -y and -m options.
DESCRIPTION
If you specify a directory name, cdc performs the requested actions on all SCCS files in that directory (that is, all files with names that
have the s. prefix). If you specify a - (dash) in place of file, cdc reads standard input and interprets each line as the name of an SCCS
file. For more information on SCCS, see the Programming Support Tools.
You can change the comments and MRs for an SID only if you made the SID or you own the file and the directory. For more information on the
permissions needed to change SCCS files, see the get command.
EXIT STATUS
For information about exit values, see the OPTIONS section.
EXAMPLES
To change the comment for SID 1.3 of SCCS file s.test.c to new comment, enter: cdc -r1.3 -y"new comment" s.test.c
SEE ALSO
Commands: admin(1), comb(1), delta(1), get(1), prs(1), rmdel(1), sact(1), sccs(1), sccsdiff(1), sccshelp(1), unget(1), val(1), what(1)
Files: sccsfile(4)
Programming Support Tools
cdc(1)