Sponsored Content
Top Forums Shell Programming and Scripting Shell : copying from one file to another file Post 302757799 by giridhar276 on Friday 18th of January 2013 03:45:33 AM
Old 01-18-2013
Shell : copying from one file to another file

Code:
vat.log
--------
null
null statistics
null
 

null
null
Storage Response Time
disk space1
disk space2

I have a log as mentioned above in which I need to copy only the below content to another file using shell scripting. In between null statistics and final null it also includes blank line as well..


Code:
null statistics
null
 

null
null


Could anyone please help me in this regard?

Thanks in advance...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

copying the csv file into different worksheets of xls file

Hi, I have a script which will generate three csv files. i want to copy the contents of these csv files into a .XLS file but in different worksheets. Can a this be done in the same script? :confused: Can Perl come to my help in coping the csv files into different worksheets of .XLS file ?... (0 Replies)
Discussion started by: nimish
0 Replies

2. Filesystems, Disks and Memory

Strange difference in file size when copying LARGE file..

Hi, Im trying to take a database backup. one of the files is 26 GB. I am using cp -pr to create a backup copy of the database. after the copying is complete, if i do du -hrs on the folders i saw a difference of 2GB. The weird fact is that the BACKUP folder was 2 GB more than the original one! ... (1 Reply)
Discussion started by: 0ktalmagik
1 Replies

3. Programming

Copying and overwriting a file using file descriptor

Hi , i have two basic requirement on linux platform . I am using C language to do this . 1) copying one file to another (assuming i know their file descriptors) 2) Overwriting a file using it file descriptor . Please guide. regards Aki (2 Replies)
Discussion started by: meet123321
2 Replies

4. Shell Programming and Scripting

sed command for copying the contents of other file replacing it another file on specifc pattern

We have 2 file XML files - FILE1.XML and FILE2.xml - we need copy the contents of FILE1.XML and replace in FILE2.xml pattern "<assignedAttributeList></assignedAttributeList>" FILE1.XML 1. <itemList> 2. <item type="Manufactured"> 3. <resourceCode>431048</resourceCode> 4. ... (0 Replies)
Discussion started by: balrajg
0 Replies

5. UNIX for Dummies Questions & Answers

Help with searching for a file in a directory and copying the contents of that file in a new file

Hi guys, I am a newbie here :wall: I need a script that can search for a file in a directory and copy the contents of that file in a new file. Please help me. :confused: Thanks in advance~ (6 Replies)
Discussion started by: zel2zel
6 Replies

6. Shell Programming and Scripting

Copying Information from One File to Another File in Shell

Hello, I'm new to scripting and I need help moving text from one file to another file. Here are examples what the files look like. File 1: Ac-223 2.10m A 1 0 0 0 Fr-219 358 9.9000E-01 0 0.0 0 0.0 0 0.0... (1 Reply)
Discussion started by: tamachan414
1 Replies

7. Shell Programming and Scripting

Shell :copying the content from one file to another

I have a log containing the below lines. file1.log ----------- module: module1 module10 module2 module002 module9 moduleRT100.2.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... (1 Reply)
Discussion started by: giridhar276
1 Replies

8. Shell Programming and Scripting

Copying a string from a file using shell script

Hello everyone I am completely new to shell scripting in linux. I wan to write a script to search for a certain string from a .txt file and copy the string which apears just after tat searched string. Eg: in a file- try.txt , we have a line saying: "roses are red, so what do i do" I... (4 Replies)
Discussion started by: Kishore920
4 Replies

9. Shell Programming and Scripting

Shell Script for copying text file to Excel Sheet

Hi, I want to write a program to copy a log file to Excel sheet. Excel sheet has four columns MethodName , Code , Description, Details and Time. I want to pick these info from text file and put it in excel sheet. here is how the text file looks - 04.17.2014 08:06:12,697... (1 Reply)
Discussion started by: hershey
1 Replies

10. Shell Programming and Scripting

Copying a file to multiple other files using a text file as input

Hello, I have a file called COMPLIST as follows that contains 4 digit numbers.0002 0003 0010 0013 0015 0016 0022 0023 0024 0025 0027 0030 0031 0032 0033 0035 0038 0041 (3 Replies)
Discussion started by: sph90457
3 Replies
null(n) 																   null(n)

__________________________________________________________________________________________________________________________________________________

NAME
null - Create and manipulate null channels SYNOPSIS
package require Tcl package require memchan null _________________________________________________________________ DESCRIPTION
The command described here is only available in a not-yet released version of the package. Use the CVS to get the sources. null creates a null channel which absorbs everything written into it. Reading from it is not possible, or rather will always return zero bytes. These channels are essentially Tcl-specific variants of the null device for unixoid operating systems (/dev/null). Transfer- ing the generated channel between interpreters is possible but does not make much sense. OPTIONS
Memory channels created by null provide one additional option to set or query. -delay ?milliseconds? A null channel is always writable and readable. This means that all fileevent-handlers will fire continuously. To avoid starvation of other event sources the events raised by this channel type have a configurable delay. This option is set in milliseconds and defaults to 5. A null channel is always writable and never readable. This means that a writable fileevent-handler will fire continuously and a readable fileevent-handler never at all. The exception to the latter is only the destruction of the channel which will cause the delivery of an eof event to a readable handler. SEE ALSO
fifo, fifo2, memchan, random, zero KEYWORDS
channel, i/o, in-memory channel, null COPYRIGHT
Copyright (c) 1996-2003 Andreas Kupries <andreas_kupries@users.sourceforge.net> Memory channels 2.2 null(n)
All times are GMT -4. The time now is 09:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy