Sponsored Content
Full Discussion: A schoolboyish stuff
Top Forums Shell Programming and Scripting A schoolboyish stuff Post 302366654 by Scrutinizer on Friday 30th of October 2009 04:21:58 AM
Old 10-30-2009
Hi, the first sed is missing a forward parenthesis, so it will not work. Anyway a sed command with those options only changes a line when it makes a match. Otherwise it will just display the unchanged line. More grep-like behavior requires the -n option. E.g:

Code:
sed -n 's/\([A-Za-z]*.*\) \(\ <1[a-z]*e\ >\) \([a-zA-Z]*.*\)/\2/p'

will most likely not display anything since no match was found. If you feed it e.g.:
Code:
echo "blabla  <1yadeyade > blabla  " | sed ...

then it will return

Code:
 <1yadeyade >

The second expression is missing a forward slash. If you feed it

Code:
 echo " <
blabla >"|sed -e ' { / </ { N; /\n.*./ { s/\ <.\n.* >/ < >/ } } }'

it will return:
Code:
 < >

 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple stuff.

I hacked my TIVO a few months ago. I made a computer specifically for this, but I only used a UNIX boot disk to get all the TIVO goodies to work. I am intersted in getting some version of UNIX on this machine and getting it onto my network. I only want to do some simple file transfers, maybe... (1 Reply)
Discussion started by: IamJAWA
1 Replies

2. Windows & DOS: Issues & Discussions

weird stuff

I coudln't think of another topic to post this under as the OS on the system is XP pro. Ok here is the go. I'm upgrdaing a mates computer. A AMD 1200Mhz and well it wouldn't boot from the CD to do a fresh install (By upgrade I mean OS with complete new install). So I opened up the box and... (4 Replies)
Discussion started by: woofie
4 Replies

3. Shell Programming and Scripting

Please help with monitoring stuff

Hi, I am trying to write a script to do monitoring kind of stuff, requirement - when a server is given a start it updates a file called server.log, I need to keep on grepping the word "Running" and as soon as it comes , script should be exited with the message , "Server came up... (2 Replies)
Discussion started by: sunilmenhdiratt
2 Replies

4. Shell Programming and Scripting

awk stuff

Hi, My input file data will be |ABCD|EFGH|IJKL|MNOP |ABCD|EF\|GH|IJKL|MNOP I am expecting output , |"ABCD"|"EFGH"|"IJKL"|"MNOP" |"ABCD"|"EF|GH"|"IJKL"|"MNOP" Note : The change basically the pipe deilmited file does contain | as value for some of the column but | will come with... (8 Replies)
Discussion started by: Nandy
8 Replies

5. Programming

More Arduino Stuff...

HI all... (Apologies for any typos.) To add to Neo's Arduino subject matter I have decided to upload this in ".zip" format. Ignore "*.info" files these are AMIGA icons only and also the "HAM" drawer as these are photos in ancient AMIGA HAM modes. I have noticed that there are current... (6 Replies)
Discussion started by: wisecracker
6 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. --font=desc Set the font description. Default is Monospace 12. --rtl Do rtl layout. --paper ps Choose paper size. Known paper sizes are legal, letter, a4. Default is A4. --bottom-margin=bm Set bottom margin in postscript points (1/72 inch). Default is 36. --top-margin=tm Set top margin. Default is 36. --left-margin=lm Set left margin. Default is 36. --right-margin=rm Set right margin. Default is 36. --help Show summary of options. --header Draw page header for each page. --markup Interpret the text as pango markup. --encoding=ENCODING Assume the documentation encoding is ENCODING. --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 02:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy