Sponsored Content
Top Forums Shell Programming and Scripting Extracting Multiple Lines from a Text File Post 302583358 by jim mcnamara on Tuesday 20th of December 2011 08:48:36 AM
Old 12-20-2011
Hangs? Makes no sense. I am assuming you are "translating" the example script to fit what you think the real data is.

Please show the output of
Code:
od -c inputfilename | head -40

This should show the real characters the file. If you cannot post the data, you can use the output to determine what a blank line really has in it. Note the red stuff in my original post - that was the hang. Gone now.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extracting unique lines from text file

I have a file with 14million lines and I would like to extract all the unique lines from the file into another text file. For example: Contents of file1 happy sad smile happy funny sad I want to run a command against file one that only returns the unique lines (ie 1 line for happy... (3 Replies)
Discussion started by: soliberus
3 Replies

2. UNIX for Dummies Questions & Answers

removing multiple lines of text in a file

Hi, I'm trying to remove multiple lines of text based off a series of different words and output it to a new file The document contains a ton of data but i want to delete any line that has the following mx1.rr.biz.com or ns2.ri.biz.com i tried using grep -v filename "mx1.rr.biz.com" >... (3 Replies)
Discussion started by: spartan22
3 Replies

3. Shell Programming and Scripting

[bash help]Adding multiple lines of text into a specific spot into a text file

I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it. For example, Here is a portion of a zone file. IN NS ns1.domain.tld. IN NS ns2.domain.tld. IN ... (2 Replies)
Discussion started by: cdn_humbucker
2 Replies

4. UNIX for Dummies Questions & Answers

Help please, extract multiple lines from a text file

Hi all, I need to extract lines between the lines 'RD' and 'QA' from a text file (following). there are more that one of such pattern in the file and I need to extract all of them. however, the number of lines between them is varied in the file. Therefore, I can not just use 'grep -A' command.... (6 Replies)
Discussion started by: johnshembb
6 Replies

5. UNIX for Dummies Questions & Answers

How to generate multiple lines in a text file?

Hello, I want to create a file whose content is multiple lines of strings. The string has the following pattern: aaaa/bbbb/A-B.txt A is a variable ranges from A1 to A2 B is a variable ranges from B1 to B2 Any ideas? Thanks. (17 Replies)
Discussion started by: vic005
17 Replies

6. Shell Programming and Scripting

Process multiple lines in a text file

Hi All I have text file like this: a=21ej c=3tiu32 e=hydkehw f=hgdiuw g=jhdkj a=klkjhvl b=dlkjhyfd a=yo c=8732 Any way I can process data from first a to just before of second a, and then second a to just before of 3rd one. Just fetching records like that will help, I mean... (3 Replies)
Discussion started by: sandipjee
3 Replies

7. UNIX for Dummies Questions & Answers

How to grep multiple lines from a text file using another text file?

I would like to use grep to select multiple lines from a text file using a single-column text file. Basically I want to only select lines from the first text file where the second column of the first text file matches the second text file. How do I go about doing that? Thanks! (5 Replies)
Discussion started by: evelibertine
5 Replies

8. UNIX for Dummies Questions & Answers

Extracting lines from a text file based on another text file with line numbers

Hi, I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

9. Shell Programming and Scripting

Extracting lines from text files in folder based on the numbers in another file

Hello, I have a file ff.txt that looks as follows *ABNA.txt 356 24 36 112 *AC24.txt 457 458 321 2 ABNA.txt and AC24.txt are the files in the folder named foo1. Based on the numbers in the ff.txt file, I want to extract the lines from the corresponding files in the foo1 folder and... (2 Replies)
Discussion started by: mohamad
2 Replies

10. Shell Programming and Scripting

Remove multiple lines from a text file

Hi I have a text file named main.txt with 10,000 lines. I have another file with a list of line numbers (around 1000) of the lines to be deleted from main.txt file. I tried with sed but it removes only a range of line numbers. Thanks for any help!! (1 Reply)
Discussion started by: prvnrk
1 Replies
CONVERT-LY(1)							   User Commands						     CONVERT-LY(1)

NAME
convert-ly - manual page for convert-ly 2.14.2 SYNOPSIS
convert-ly [OPTION]... FILE DESCRIPTION
Update LilyPond input to newer version. By default, update from the version taken from the version command, to the current LilyPond ver- sion.Examples: $ convert-ly -e old.ly $ convert-ly --from=2.3.28 --to=2.5.21 foobar.ly > foobar-new.ly OPTIONS
--version show version number and exit -h, --help show this help and exit -f, --from=VERSION start from VERSION [default: version found in file] -e, --edit edit in place -n, --no-version do not add version command if missing -c, --current-version force updating version number to 2.14.2 -d, --diff-version-update only update version number if file is modified -s, --show-rules show rules [default: -f 0, -t 2.14.2] -t, --to=VERSION convert to VERSION [default: 2.14.2] -w, --warranty show warranty and copyright REPORTING BUGS
Report bugs via http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs SEE ALSO
The full documentation for convert-ly is maintained as a Texinfo manual. If the info and convert-ly programs are properly installed at your site, the command info convert-ly should give you access to the complete manual. convert-ly 2.14.2 February 2013 CONVERT-LY(1)
All times are GMT -4. The time now is 02:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy