Sponsored Content
Top Forums UNIX for Dummies Questions & Answers copy a line from one file to another Post 302316206 by vbe on Thursday 14th of May 2009 10:57:05 AM
Old 05-14-2009
Youre welcome!
Just needed to spark off curiosity...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl script to search a line and copy it to another line

Hi I have a log file (say log.txt). I have to search for a line which has the string ( say ERROR) in the log file and copy 15 lines after this into another file (say error.txt). Can someone give me the code and this has to be in PERL Thanks in advance Ammu (3 Replies)
Discussion started by: ammu
3 Replies

2. Shell Programming and Scripting

Help with a shell script to modify one line and copy the next 9 to same file

Hi everyone, the problem is quite simple, yet I can't find an easy solution using awk. I need to search for a string in $3, then if I find this string, copy the line,modify $3, and copy the next 9 lines to the same file. My problem is in the copying of the lines... Finding and modifying... (5 Replies)
Discussion started by: Teroc
5 Replies

3. Shell Programming and Scripting

Read and copy xml line by line and preserve tab?

I'm trying to read an xml file and copy it line by line to another file and want to preserve the tabs. What i'm trying to do is if I get to a certain line in the xml, I'm going to check to see if the next line is specifically what I want. If it's not, then I want to insert a single line of text... (4 Replies)
Discussion started by: DeuceLee
4 Replies

4. UNIX for Dummies Questions & Answers

How to copy entire file content into another file being in last line mode of vi ?

How to copy entire file content into another file being in last line mode of vi ? ---------- Post updated at 10:07 AM ---------- Previous update was at 09:56 AM ---------- Got it : :1,30w file.txt (1 Reply)
Discussion started by: presul
1 Replies

5. Shell Programming and Scripting

copy line to new file if word matches

I'm drawing blank on this. The log file I have is filled with garbage, but the important lines are ##/##/### Installation xxxxxxx So, I want to sed the line to a new file IF the word installation is in it. I tried removing none matching lines sed 's/Installation/,//!d' infile > outfile but that... (3 Replies)
Discussion started by: dba_frog
3 Replies

6. UNIX for Dummies Questions & Answers

vim copy line and paste at the beginning, middle, and end of another line

How would you do vim copy line and paste at the beginning, middle, and end of another line. I know yy copies the whole line and p pastes the whole line, but on its own separate line. Sometimes I would like to copy a line to the beginning, middle, or end of another line. I would think this would be... (3 Replies)
Discussion started by: cokedude
3 Replies

7. Shell Programming and Scripting

how to copy the directory but not copy certain file

Hi experts cp bin root src /mnt but not copy bin/bigfile any help? ( I post this thread in the "redhat" forum wrongly, I don't know how to withdraw that question in that wrong forum) Thanks (6 Replies)
Discussion started by: yanglei_fage
6 Replies

8. Shell Programming and Scripting

Copy some line and paste it after some line in same file

Hi, I want to know how I can copy line 6th to 10th and paste it after 17th line in same file. Thanks, Biplab (19 Replies)
Discussion started by: Biplab
19 Replies

9. UNIX for Dummies Questions & Answers

Copy text in file to every line in another file

I have a document m1 which contains a single line of text which I want to copy to the beginning of all lines in another document. How do I do this?? (4 Replies)
Discussion started by: RobertoRivera
4 Replies

10. Shell Programming and Scripting

Copy Column Value Of Next Line Into Current Line

Hello All, I am looking for help to achieve the following: Here is the data set 1757890237|42|55570025|1468796400|0 1757890237|32|55570025|1471474800|0 1757890237|54|55570025|1474153200|1476745200 1757890237|34|55570026|1468796400|0 1757890237|44|55570026|1471474800|0... (7 Replies)
Discussion started by: angshuman
7 Replies
sparkmake(1)															      sparkmake(1)

NAME
sparkmake - generates SPARK index and metafiles SYNOPSIS
spark [OPTIONS] [ROOT_FILE] DESCRIPTION
The SPARKMake tool automatically generates two files that can be used as arguments to the Examiner command line: The index file and the meta file. For more information please refer to the full Examiner manual. This manual page only summarises the sparkmake command-line flags, please refer to the full SPARKMake manual for further information. OPTIONS
These options do not quite follow the usual GNU command line syntax. All options start with a single dash instead of the usual two and they can also be abbreviated, as long as the abbreviation is unique. For example -expand can be abbreviated to -expa but not -exp as this clash- es with -export_indent. For a description of the regular expression syntax, please refer to the appropriate section below. If ROOT_FILE is not given then we produce an index and metafile for all files in and under the current directory. -help Display command-line help. -version Display version information. -directory=DIRNAME Look in and under DIRNAME as well as the current working directory. This option can be specified more than once; buy default we only look at the current working directory. -include=REGEXP Only include files if their full path matches the given regular expression. -exclude=REGEXP Exclude files if their full patch matches the given regular expression. -duplicates_are_errors Fail if duplicate units are found. -annotation_character=CHAR Select alternative annotation character. The default is '#'. -language=L This can be one of 83, 95 (the default) or 2005. -index=FILE_SPEC, -noindexfile The index file to generate, by default this is ROOT_FILE.idx. -meta=FILE_SPEC, -nometafile The metafile to generate, by default this is ROOT_FILE.smf. -path_option=MODE Produce 'relative' or 'full' pathnames. By default we produce full pathnames. SPARKMAKE REGULAR EXPRESSION SYNTAX
Please note that the regular expression syntax used by SPARKMake differs from both POSIX and Perl regular expressions. Please also take care to appropriately escape anythign that your shell might replace or expand (such as * or ?). The characters '{' and '}' are not allowed to appear in any regular expression. reg_exp = term term = elmt | elmt elmt ... | * | ? | [char char ...] | [char - char] elmt = nchr | [nchr nchr ...] | [^ nchr nchr ...] | [nchr - nchr] | . | ( reg_exp ) The * has special meaning; it matches any string of 0 or more characters. Note that this differs from POSIX regex where the equivalent would be '.*'. The special characters ? and . have the same meaning, they match any character. Thus, ? does not hold the same meaning it does in a POSIX regular expression. The [ab...] notation means the usual: match any character listed. The [a-f] notation means the usual: match any character in the given range. The [^a-f] notation means the usual: match any character not in the given range. char can be any character, including special characters. nchr can be any character except '', '(', ')', '[', ']', '.', '*', '+', '?' or '^'. It is possible to specify such a special character by escaping it with a backslash. SEE ALSO
spark(1), sparksimp(1), spadesimp(1), zombiescope(1), victor(1), pogs(1) sparkformat(1) AUTHOR
This manual page was written by Florian Schanda <florian.schanda@altran-praxis.com> for the Debian GNU/Linux system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Ver- sion 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. 22 March 2011 sparkmake(1)
All times are GMT -4. The time now is 11:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy