Sponsored Content
Full Discussion: Adding a block to the file
Top Forums Shell Programming and Scripting Adding a block to the file Post 302227102 by ROOZ on Wednesday 20th of August 2008 03:38:57 PM
Old 08-20-2008
Adding a block to the file

Hi guys,
I am trying to add the content of fileB into fileA but after a specific block within FileA
for instance i have a file that starts as follow:

-------------------------------------------------------------------------------
-- Title :
-- Project :
-------------------------------------------------------------------------------
-- File :
-- Author :
-- Company :
-- Created :
-- Last update: 2458/05/14
-- Platform :
-------------------------------------------------------------------------------
-- Description: <cursor>
-------------------------------------------------------------------------------
-- Copyright (c)
-------------------------------------------------------------------------------
-- Date Version Author Description
-- 2098-10-17 1.0 Created
-- 2076-12-11 1.0 Imported from
-- 2747-05-03
--------------------------------------------------------------------------

------------------------------------------------------------------------
--
-- Portions Copyright (c)
-- All rights reserved
--
-- Proprietary and Confidential
--
-- Portions of this code embody materials and concepts which are confidential
-- to and is made available
-- solely pursuant to the terms of a written agreement with
-- .
--
--------------------------------------------------------------------------


...the rest of the code

I need to remove the bold part and add content of fileb under the tilted part.
i am pretty much helpless on this part.
I was wondering if someone could help me with this?

Thanks,
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need Help for Adding Three new columns in existing file from fatching data from file

not required this time (36 Replies)
Discussion started by: Sandeep_Malik
36 Replies

2. Shell Programming and Scripting

Need help in sed command (adding a blank line btw each block generated by pattern)

Hello friends, I have a C source code containing sql statements. I use the following sed command to print all the sql blocks in the source code.... sed -n "/exec sql/,/;/p" Sample.cpp The above sed command will print the sql blocks based on the pattern "exec sql" & ";"... (2 Replies)
Discussion started by: frozensmilz
2 Replies

3. Shell Programming and Scripting

Need help in sed: adding a line after each search block

Hi friends, I have written script that will search & display the block of sql statement. Since there are many blocks of sql statement i am finding it difficult to distinguish between them. The below is the sed command & its result exec sql abc abc abc... (2 Replies)
Discussion started by: frozensmilz
2 Replies

4. Shell Programming and Scripting

finding a block in a file and replace with another file block.

(1) Yes but how is this block different from the other 24? You will need this information in order to identify and replace this block correctly (out of the 25). Ans: The 1st line and last line of this block are unique from other block. The 1st line is “rem Subset Rows (&&tempName.*) and The... (1 Reply)
Discussion started by: Zaheer.mic
1 Replies

5. Shell Programming and Scripting

Adding new lines to a file + adding suffix to a pattern

I need some help with adding lines to file and substitute a pattern. Ok I have a file: #cat names.txt name: John Doe stationed: 1 name: Michael Sweets stationed: 41 . . . And would like to change it to: name: John Doe employed permanently stationed: 1-office (7 Replies)
Discussion started by: hemo21
7 Replies

6. Shell Programming and Scripting

editing line in text file adding number to value in file

I have a text file that has data like: Data "12345#22" Fred ID 12345 Age 45 Wilma Dino Data "123#22" Tarzan ID 123 Age 33 Jane I need to figure out a way of adding 1,000,000 to the specific lines (always same format) in the file, so it becomes: Data "1012345#22" Fred ID... (16 Replies)
Discussion started by: say170
16 Replies

7. Shell Programming and Scripting

Adding content of two file in a single file column wise

Hi, I am trying to get the file in particular pattern using shell script. I have to add one column to some other file. For example consider two file as below. File1: name1 name2 name3 File2: Add1 age1 Add2 age2 Add3 age3 I want this two file in a single file format something like... (3 Replies)
Discussion started by: diehard
3 Replies

8. UNIX for Advanced & Expert Users

Move a block of lines to file if string found in the block.

I have a "main" file which has blocks of data for each user defined by tags BEGIN and END. BEGIN ID_NUM:24879 USER:abc123 HOW:47M CMD1:xyz1 CMD2:arp2 STATE:active PROCESS:id60 END BEGIN ID_NUM:24880 USER:def123 HOW:4M CMD1:xyz1 CMD2:xyz2 STATE:running PROCESS:id64 END (7 Replies)
Discussion started by: grep_me
7 Replies

9. Shell Programming and Scripting

Printing a block of lines from a file, if that block does not contain two patterns using sed

I want to process a file block by block using sed, and if that block does not contain two patterns, then that complete block has to be printed. See below for the example data. ................................server 1............................... running process 1 running... (8 Replies)
Discussion started by: Kesavan
8 Replies

10. UNIX for Beginners Questions & Answers

Adding to an array in an external file, and adding elements to it.

I have an array in an external file, "array.txt", which contains: char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies
GNOME-DISKS(1)							gnome-disk-utility						    GNOME-DISKS(1)

NAME
gnome-disks - the GNOME Disks application SYNOPSIS
gnome-disks [OPTIONS] DESCRIPTION
gnome-disks is the command to launch the GNOME Disks application. Disks provides a way to inspect, format, partition and configure disks and block devices. The Disks application is single-instance. What this means is that if the application is not already running when the gnome-disks command is invoked, it will get launched and the command invocation will block until the application exits. Otherwise the existing application instance will be used and the gnome-disks command will exit immediately. OPTIONS
The following options are understood: --block-device DEVICE Switches to the Disks application and selects the block device given by DEVICE (for example, /dev/sda). --block-device DEVICE --format-device [--xid WINDOW-ID] Shows the "Format Volume" dialog for the block device given by DEVICE (for example, /dev/sdb1). If WINDOW-ID is given, makes the dialog transient to the given XID. --help Prints a short help text and exits. AUTHOR
Written by David Zeuthen <zeuthen@gmail.com> with a lot of help from many others. BUGS
Please send bug reports to either the distribution bug tracker or the upstream bug tracker at https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-disk-utility. SEE ALSO
gnome-disk-image-mounter(1), udisks(8) GNOME
March 2013 GNOME-DISKS(1)
All times are GMT -4. The time now is 12:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy