![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding Multiple Lines to Multiple Files | dayinthelife | Shell Programming and Scripting | 2 | 06-04-2008 11:50 AM |
| retrieved multiple lines on multiple places in a file | dala | Shell Programming and Scripting | 8 | 03-14-2008 03:28 PM |
| using sed command to delete a string spanning multiple lines | radha.kalivar | Shell Programming and Scripting | 9 | 07-25-2007 10:26 AM |
| How can I replace multiple lines from different files | ranga27 | Shell Programming and Scripting | 2 | 02-07-2007 08:57 PM |
| How to run awk command having multiple lines | nani_g | Shell Programming and Scripting | 0 | 06-09-2006 02:49 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
using sed command to replace multiple lines
the file contains the follwoing lines
/* * Copyright (C) 1995-1996 by XXX Corporation. This program * contains proprietary and confidential information. All rights reserved * except as may be permitted by prior written consent. * * $Id: xxx_err.h,v 1.10 2001/07/26 18:48:34 zzzz $ */ in this \n can be any where inside copy right stmt. This should be replace with the following lines /* * Copyright (C) 1995-2004 by YYY. All rights reserved. * This program contains proprietary and confidential information. */ I tried using the following commands past="Copyright\s.*XXX Corporation\.[:word]*consent.[\s]" pres='* Copyright (c) 2004 by YYY. All rights reserved.\ * This program contains proprietary and confidential information.' sed "s/$past/$pres/" $fileName > fileMod but it is not matching with copyright stmt in the file. can somebody correct this |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|