Sponsored Content
Top Forums Shell Programming and Scripting move contents from one file to another based on line number or content Post 302423226 by jim mcnamara on Thursday 20th of May 2010 11:49:56 AM
Old 05-20-2010
Code:
awk ' ok==1 {print $0} 
       /third line/ {ok=1} ' inputfile > outputfile

substitute the words "thrid line" with your random characters. NOTE: printing starts with the LINE AFTER the file record with "third line" in it.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Split File Based on Line Number Pattern

Hello all. Sorry, I know this question is similar to many others, but I just can seem to put together exactly what I need. My file is tab delimitted and contains approximately 1 million rows. I would like to send lines 1,4,& 7 to a file. Lines 2, 5, & 8 to a second file. Lines 3, 6, & 9 to... (11 Replies)
Discussion started by: shankster
11 Replies

2. UNIX for Dummies Questions & Answers

How to read contents of a file from a given line number upto line number again specified by user

Hello Everyone. I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below: if ; then if ; then tail +$1 $3 | head -n $2 else ... (5 Replies)
Discussion started by: grc
5 Replies

3. Shell Programming and Scripting

Extract string from multiple file based on line count number

Hi, I search all forum, but I can not find solutions of my problem :( I have multiple files (5000 files), inside there is this data : FILE 1: 1195.921 -898.995 0.750312E-02-0.497526E-02 0.195382E-05 0.609417E-05 -2021.287 1305.479-0.819754E-02 0.107572E-01 0.313018E-05 0.885066E-05 ... (15 Replies)
Discussion started by: guns
15 Replies

4. Shell Programming and Scripting

join based on line number when one file is missing lines

I have a file that contains 87 lines, each with a set of coordinates (x & y). This file looks like: 1 200.3 -0.3 2 201.7 -0.32 ... 87 200.2 -0.314 I have another file which contains data that was taken at certain of these 87 positions. i.e.: 37 125 42 175 86 142 where the first... (1 Reply)
Discussion started by: jackiev
1 Replies

5. Shell Programming and Scripting

Splitting a file based on line number

Hi I have a file with over a million lines (rows) and I want to split everything from 500,000 to a million into another file (to make the file smaller). Is there a simple command for this? Thank you Phil (4 Replies)
Discussion started by: phil_heath
4 Replies

6. Shell Programming and Scripting

How to split a file based on pattern line number?

Hi i have requirement like below M <form_name> sdasadasdMklkM D ...... D ..... M form_name> sdasadasdMklkM D ...... D ..... D ...... D ..... M form_name> sdasadasdMklkM D ...... M form_name> sdasadasdMklkM i want split file based on line number by finding... (10 Replies)
Discussion started by: bhaskar v
10 Replies

7. Shell Programming and Scripting

Sort file based on number of delimeters in line

Hi, Need to sort file based on the number of delimeters in the lines. cat testfile /home/oracle/testdb /home /home/oracle/testdb/newdb /home/oracle Here delimeter is "/" expected Output: /home/oracle/testdb/newdb /home/oracle/testdb /home/oracle /home (3 Replies)
Discussion started by: Sumanthsv
3 Replies

8. Shell Programming and Scripting

Insert content of a file to another file at a line number which is given by third file

Hi friends, here is my problem. I have three files like this.. cat file1.txt ======= unix is best unix is best linux is best unix is best linux is best linux is best unix is best unix is best cat file2.txt ======== Windows performs better Mac OS performs better Windows... (4 Replies)
Discussion started by: Jagadeesh Kumar
4 Replies

9. Shell Programming and Scripting

Move multiple files 4rm Source to different target folders based on a series num in the file content

Dear Experts my scenario is as follows... I have one source folder "Source" and 2 target folders "Target_123456" & "Target_789101". I have 2 series of files. 123456 series and 789101 series. Each series has got 3 types of fiels "Debit", "Refund", "Claims". All files are getting... (17 Replies)
Discussion started by: phani333
17 Replies
VILISTEXTUM(1)						      General Commands Manual						    VILISTEXTUM(1)

NAME
vilistextum - html to ascii converter SYNOPSIS
vilistextum [OPTIONS] [inputfile |-] [outputfile | -] DESCRIPTION
vilistextum is a html to ascii converter specifically programmed to get the best out of incorrect html. OPTIONS
inputfile,- resp. outputfile,- replace inputfile with '-' for reading from standard input, likewise outputfile with '-' for writing to standard output. -a, --no-alt don't output anything for IMG tags even if they have an ALT attribute. Implies --no-image. -c, --convert-tags some tags will be converted to special characters. -e, --errorlevel NUMBER increase level of verbosity for error messages (0: No error messages). -i, --defimage STRING IMG tags without alt attribute are output as [STRING]. -l, --links numbers the links in the document and creates footnotes of each link at the end of the file. -k, --links-inline print the links directly after the html tag. -m, --dont-convert-characters don't convert the entities from windows1252 (&#128;-&#159; and their proper entity names) -n, --no-image don't output [Image] for IMG tags that have no ALT attribute. -p, --palm output text more suitable for reading on a PDA. -r, --remove-empty-alt if there is an empty ALT attribute in a IMG tag (eg <IMG href="..." alt="">), don't output '[]'. -s, --shrink-lines [NUMBER] if there are more than NUMBER empty lines, output only NUMBER. Default: 1. -t, --no-title don't output title. -w, --width NUMBER maximum line width. -h, --help display this help and exit -v, --version output version information and exit MULTIBYTE OPTIONS (Only available if compiled with multibyte support) -u, --output-utf-8 instead of the character set of the html document, everything will be output as utf-8. -x, --translit use the //TRANSLIT feature of libiconv. Consult the iconv manual for details. -y, --charset CHARSET if the HTML document doesn't provide a character set in the meta tags, use CHARSET. LIMITATIONS
The rendering of tables is not very good. The handling of OL is incomplete. The program treats it as UL and more than 10 nested lists confuse it. Text is never justified. REPORTING BUGS
Please report bugs to <bhaak@gmx.net>. AUTHOR
Vilistextum was written by Patric Mueller <bhaak@gmx.net> and may be freely distributed under the terms of the GNU General Public License Version 2. There is ABSOLUTELY NO WARRANTY for this program. SEE ALSO
iconv(3), lynx(1), links(1), w3m(1) 22 OCT 2006 VILISTEXTUM(1)
All times are GMT -4. The time now is 11:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy