![]() |
|
|
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 |
| file moving based on file content | melvyn.cochrane | Shell Programming and Scripting | 12 | 02-15-2008 06:10 AM |
| deleting particular lines and moving a line up using perl/sed | sabyasm | Shell Programming and Scripting | 5 | 12-12-2007 05:59 PM |
| Moving next 2 lines contents to previous lines | Amruta Pitkar | Shell Programming and Scripting | 8 | 04-26-2007 07:09 AM |
| moving a file? | Holistic | UNIX for Dummies Questions & Answers | 1 | 02-20-2003 07:47 PM |
| moving or removing a file | rooh | UNIX for Dummies Questions & Answers | 3 | 01-02-2002 02:47 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Moving lines within a txt file
A newbie to shell scripting.....
I need some assistance in doing the following: I have a system generated text file(a makefile basically). Before I can execute the make command, I need to modify one section of this generated file. The generated section is as follows: # INCLUDE macro for SCI #~~~~~~~~~~~~~~~~~~~~~~~ XYZ_MAIN_INCLUDE = \ -I/Path_1 \ -I/Path_2 \ -I/Path_3 \ -I/Path_4 Basically, Path_4 has be placed at the start of the INCLUDE section with appropriate changes to new line delimiters. This modified section should look as follows: # INCLUDE macro for SCI #~~~~~~~~~~~~~~~~~~~~~~~ XYZ_MAIN_INCLUDE = \ -I/Path_4 \ -I/Path_1 \ -I/Path_2 \ -I/Path_3 I have to make similar changes to 6 different files in 6 different locations in the directory structure before I can execute make. Can I achieve this using a shell script without having to modify all the files manually everytime I need to execute a make? Thanks in advance for any suggestions. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|