Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to grep for first entry in a file? Post 302919574 by Skrynesaver on Thursday 2nd of October 2014 08:13:10 AM
Old 10-02-2014
If I want the first 10 lines
Code:
 ${command that generates more results than I want} | head -10

And if I want the last 10
Code:
 ${command that generates more results than I want} | tail -10

This User Gave Thanks to Skrynesaver For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep table entry problem

Hi, I have a table which looks like this Line a b c 0 10 0 0 1 0 0 2 0 ... (1 Reply)
Discussion started by: ahjiefreak
1 Replies

2. Shell Programming and Scripting

Deleting file entry

Hello everyone, I want to compare the first line of a file(ABC) with that of a folder,XYZ(folder contents) and want that line to be deleted from the file(ABC) if that entry doesn't exist in the folder(XYZ) I want to put this in a loop. please can anyone help thanks (6 Replies)
Discussion started by: swasid
6 Replies

3. Shell Programming and Scripting

Not able to check for entry within file

Hi I am basically checking if a required entry exists within a file. In the code below I am fetching all directories of the format rel1, rela, rel3..etc..The same entries also exist in the sample log file. I want to check if entry in file1 exists within file2 but it is failing. Can you please... (4 Replies)
Discussion started by: swasid
4 Replies

4. UNIX for Dummies Questions & Answers

grep for password file entry

How would I grep for password file entry without using grep 'username' /etc/passwd? perhaps with who? I want to create alias that will find the password file entry regardless of the user who is using it. I am trying to get the same exact line from the file entry like: Name : Password : UserID... (7 Replies)
Discussion started by: alis
7 Replies

5. UNIX Desktop Questions & Answers

How to grep for password file entry

How would I grep for password file entry without using grep 'username' /etc/passwd? perhaps with who? I want to create alias that will find the password file entry regardless of the user who is using it. Thanks (4 Replies)
Discussion started by: alis
4 Replies

6. UNIX for Dummies Questions & Answers

grep first occurrence but continue to next entry in patternfile

I have 1300 files (SearchFiles0001.txt, SearchFiles0002.txt, etc.) , each with 650,000 lines, tab-delimited data. I have a pattern file, with about 1000 lines with a single word. Each single word is found in the 1300 files once. If I grep -f PatternFile.txt SearchFiles*.txt >OutputFile.txt... (2 Replies)
Discussion started by: newhavendweeb
2 Replies

7. Shell Programming and Scripting

[awk] grep a part of filename as entry file

hi all, i need to combine these files into one csv file. Bounce_Mail_Event_Daily_Report_01_Jul_2012.csv Bounce_Mail_Event_Daily_Report_02_Jul_2012.csv Bounce_Mail_Event_Daily_Report_03_Jul_2012.csv Bounce_Mail_Event_Daily_Report_04_Jul_2012.csv... (10 Replies)
Discussion started by: makan
10 Replies

8. Shell Programming and Scripting

Need to grep certain entry out of log file

This one is a bit too challenging for me... Hopefully you guys can help. Let's say I have a log file called: "$MW_HOME/user_projects/domains/IDMDomain/servers/wls_ods?/logs/wls_ods1-diagnostic.log" In this log file I want to search for "DIP-10219". When I execute this $ cat... (7 Replies)
Discussion started by: exm
7 Replies

9. How to Post in the The UNIX and Linux Forums

Help me, write a bash script to delete parent entry with all their child entry in LDAP UNIX server

Hi All, Please help me and guide me to write a bash/shell script on Linux box to delete parent entry with all their child entries. example: Parent is : ---------- dn: email=yogesh.kumar@wipro.com, o=wipro, o=in child is: ---------- dn: cn: yogesh kumar, email=yogesh.kumar@wipro.com,... (1 Reply)
Discussion started by: Chand
1 Replies

10. Shell Programming and Scripting

How to replace multiple "&nbsp;" entry with in <td> tag into single entry using sed?

I have the input file like this. Input file: 12.txt 1) There are one or more than one <tr> tags in same line. 2) Some tr tags may have one <td> or more tna one <td> tags within it. 3) Few <td> tags having "<td> &nbsp; </td>". Few having more than one "&nbsp;" entry in it. <tr> some td... (4 Replies)
Discussion started by: thomasraj87
4 Replies
any2ps(1)						      General Commands Manual							 any2ps(1)

NAME
any2ps - Converts a file to mule internal code and then to PostScript format SYNOPSIS
any2ps [-in coding_system] [m2ps_options] < infile > outfile OPTIONS
Specifies the coding system (in the input file) that needs to be converted to mule *internal* code. By default, the input file is assumed to be in mule *internal* code, which means that code conversion is not done. Specifies one or more options passed by any2ps to the m2ps program. Refer to m2ps(1) for a description of these options. OPERANDS
Specifies the input file to be converted to *internal* code. Specifies the output PostScript file. DESCRIPTION
The any2ps command is an alternative to running the coco and m2ps programs separately. Like the programs that it invokes, any2ps is derived from software supplied by the Free Software Foundation. The any2ps program performs the following operations: Invokes coco to convert the input file from the specified coding system to Mule internal code (called *internal* code) Passes the converted result, along with the specified m2ps options, to m2ps for processing The m2ps program then generates the PostScript program file to be printed. SEE ALSO
Commands: coco(1), m2ps(1), mule(1) any2ps(1)
All times are GMT -4. The time now is 09:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy