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
UPDATE-INETD(8) 						      rlinetd							   UPDATE-INETD(8)

NAME
update-inetd - manage rlinetd (and inetd) configuration entries SYNOPSIS
update-inetd [options] --add ENTRY update-inetd [options] --remove SERVICE update-inetd [options] --enable SERVICE update-inetd [options] --disable SERVICE DESCRIPTION
update-inetd is a rlinetd's compatibility script, which can be used to by various Debian post-installation scripts to manage services in rlinetd configuration files directory /etc/rlinetd.d. update-inetd will spawn update-inetd.real(8) for managing entries in /etc/inetd.conf file. Please see update-inetd.real(8) for details. ACTIONS
--add ENTRY Adds an entry, which should be a line in a inetd.conf(5) format. --remove SERVICE Removes a service. --enable SERVICE Enables a service. --disable SERVICE Disables a service. OPTIONS
--version Prints version information on standard output and exit successfully. --debug Enables debugging mode. Note the option is also passed to update-inetd.real(8). Any other option is passed directly to update-inetd.real(8). FILES
/etc/rlinetd.conf, /etc/rlinetd.d/*, /etc/inetd.conf SEE ALSO
update-inetd.real(8), inetd.conf(5), rlinetd.conf(5), inetd2rlinetd(8) AUTHOR
Robert Luberda <robert@debian.org> Debian January 3rd, 2009 UPDATE-INETD(8)
All times are GMT -4. The time now is 02:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy