Sponsored Content
Full Discussion: Grep text
Top Forums Shell Programming and Scripting Grep text Post 302560002 by Scrutinizer on Wednesday 28th of September 2011 03:36:09 PM
Old 09-28-2011
Code:
awk '{p=$NF;getline;print p $NF}' infile

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep multiple text files in folder into 1 text file?

How do I use the grep command to take mutiple text files in a folder and make one huge text file out of them. I'm using Mac OS X and can not find a text tool that does it so I figured I'd resort to the BSD Unix CLI for a solution... there are 5,300 files that I want to write to one huge file so... (7 Replies)
Discussion started by: coppertone
7 Replies

2. UNIX for Dummies Questions & Answers

retrieve text after grep

I am trying to search for a pattern in a file containing xml - When I match the search I want to retrieve all the text within the xml brackets.. Whats the best way to read in data between xml tags in a shell script? ie.. xml returned which I have in a file now is something like below:... (2 Replies)
Discussion started by: frustrated1
2 Replies

3. Shell Programming and Scripting

grep for text and lines above and below

hi all, in ksh i wanted to grep for some text and also include a few lines above and below that text. how do i do that ??? i am trying to get my script to print out request and response from the server log file. getting the request is easy, i just do a grep -i "request" from log but i... (5 Replies)
Discussion started by: cesarNZ
5 Replies

4. Shell Programming and Scripting

Text file with grep

Sirs, i am trying to create simple script file.. what i do is grep for a pattern and output 1 line after it. exmp: grep -A 1 time files.txt Output: time file1 time file2 --- Is there some option I can use so I can get on result each 2 lines combined as one file? like: time file1... (2 Replies)
Discussion started by: alekkz
2 Replies

5. UNIX Desktop Questions & Answers

grep a range of text

hey, i need to grep / awk a list of "DEV ID" range for example for greping 0936 - 09C1 from this file: 0x5000097310036d05 558 1 20531 LOCAL GLOBAL 42048000 YES 0x8e36c8bd07ce9e13 DEV ID: 0933 0x5000097310036d05 559 1 20531 ... (1 Reply)
Discussion started by: boaz733
1 Replies

6. 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

7. Shell Programming and Scripting

Matching text using grep

Hi folks... Relatively new to scripting, but really struggling with something that will no doubt be second nature to most people on here: Trying to get an exact match on $sub, where sub is an ip address. subnet () { clear while true do ... (18 Replies)
Discussion started by: CiCa
18 Replies

8. Shell Programming and Scripting

Grep text matching problem with script which checks if web page contains text.

I wrote a Bash script which checks to see if a text string exists on a web page and then sends me an email if it does (or does not e.g. "Out of stock"). I run it from my crontab, it's quite handy from time to time and I've been using it for a few years now. The script uses wget to download an... (6 Replies)
Discussion started by: gencon
6 Replies

9. Linux

Grep the ip to a text file

Hi all, We Have Squid server, We need to get the particular IP's log from /var/log/squid/access.log, if i need to get only the log's of 192.168.0.99, How can i get the log's to a separate file. Here is the sample log what i have got from access.log file 1392706763.690 847... (2 Replies)
Discussion started by: babinlonston
2 Replies

10. Shell Programming and Scripting

Grep text and see all section

Hello I am looking for a way to look in files and to grep text and see the all section of the text ! Sharon123 deed 10000 class 360 ! sharon456 2000 deed ! Sharon789 live 3000 ! To grep "deed "an see the all section (5 Replies)
Discussion started by: sharong
5 Replies
PAPS(1) 						      General Commands Manual							   PAPS(1)

NAME
paps - UTF-8 to PostScript converter using Pango SYNOPSIS
paps [options] files... DESCRIPTION
paps reads a UTF-8 encoded file and generates a PostScript language rendering of the file. The rendering is done by creating outline curves through the pango ft2 backend. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. --landscape Landscape output. Default is portrait. --columns=cl Number of columns output. Default is 1. Please notice this option isn't related to the terminal length as in a "80 culums terminal". --font=desc Set the font description. Default is Monospace 12. --rtl Do right to left (RTL) layout. --paper ps Choose paper size. Known paper sizes are legal, letter and A4. Default is A4. Postscript points Each postscript point equals to 1/72 of an inch. 36 points are 1/2 of an inch. --bottom-margin=bm Set bottom margin. Default is 36 postscript points. --top-margin=tm Set top margin. Default is 36 postscript points. --left-margin=lm Set left margin. Default is 36 postscript points. --right-margin=rm Set right margin. Default is 36 postscript points. --gutter-width=gw Set gutter width. Default is 40 postscript points. --help Show summary of options. --header Draw page header for each page. --markup Interpret the text as pango markup. --lpi Set the lines per inch. This determines the line spacing. --cpi Set the characters per inch. This is an alternative method of specifying the font size. --stretch-chars Indicates that characters should be stretched in the y-direction to fill up their vertical space. This is similar to the texttops behaviour. AUTHOR
paps was written by Dov Grobgeld <dov.grobgeld@gmail.com>. This manual page was written by Lior Kaplan <kaplan@debian.org>, for the Debian project (but may be used by others). April 17, 2006 PAPS(1)
All times are GMT -4. The time now is 12:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy