Sponsored Content
Full Discussion: Help with grep script
Homework and Emergencies Homework & Coursework Questions Help with grep script Post 302789419 by hanson44 on Wednesday 3rd of April 2013 03:37:47 PM
Old 04-03-2013
Like the previous poster, I can confirm there is a solution to this delightful little problem. And it's not a trick question. The solution is a great demonstration of how useful regular expressions can be.

Hey, original poster, where are you? We'd like to hear what you tried so far, or if the assignment is over. Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

grep from a script...

This is an extract from a script that i am trying to run. for tim in "2005:00:" "2005:01:" "2005:02:" "2005:03:" "2005:04:" "2005:05:"; do FormString="$tim" echo "grep '$FormString' access.10Aug-1201AM" count=`grep "$FormString" access.10Aug-1201AM | wc -l` ... (1 Reply)
Discussion started by: hamsasal
1 Replies

2. UNIX for Dummies Questions & Answers

grep script

hi guys, i was hoping you could help me out with the following im designing a help site for my work colleagues and would like a little script which would do a grep to check if an application is running on unix for example this is what i do on unix ps -ef | grep mqm and this tells me if... (4 Replies)
Discussion started by: drchris
4 Replies

3. Shell Programming and Scripting

Grep within a script

Hi, I am new to this - I have a unix command (below) that I would like to make automated. I would like the script to run the below command line but would like user input for '\' and '\' as these values will change depending on what i'm searching for. Is this possible? if so please help. ... (13 Replies)
Discussion started by: dnash
13 Replies

4. UNIX for Dummies Questions & Answers

trying to grep the first few lines of a continuos script, and exit the script anyidea

Hi. I am trying to extract the output of the first few lines of a continuos sh script. The when i run it, i wont to grep the the first 20 lines of it for an entry and basically do a crtl z out of it or to that effect, and output the results to a text file. I basically want to script... (5 Replies)
Discussion started by: k00061804
5 Replies

5. Shell Programming and Scripting

How to grep sql error in shell script and exit the script?

I need help in the following script. I want to grep the sql errors insert into the error table and exit the shell script if there is any error, otherwise keep running the scripts. Here is my script #!/bin/csh -f source .orapass set user = $USER set pass = $PASS cd /opt/data/scripts echo... (2 Replies)
Discussion started by: allinshell99
2 Replies

6. Shell Programming and Scripting

script use min resource ( grep grep)

Hi i wrote script use it as watchdog ( i mean it check another program (pooya) whenever that was killed (closed or crashed) it run another script (pooya_start.sh) to start it, this script work fine and do the job for me , i need help of an expert to tell me (exact command) how to change this... (8 Replies)
Discussion started by: pooyair
8 Replies

7. UNIX for Dummies Questions & Answers

grep IP script

Hello, I have a command and would like to make that as a script. How do I do that? my command is: grep -Eo +\.+\.+\.+. and i want to have that like grepscript.sh x.txt > IP.txt Can somebody help me? (3 Replies)
Discussion started by: eightball
3 Replies

8. Shell Programming and Scripting

Inconsistent `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`

i have this line of code that looks for the same file if it is currently running and returns the count. `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l` basically it is assigned to a variable ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies

9. Shell Programming and Scripting

Help with script - GREP

Hallo gentlemen, i've a problem removing lines from txt file. To make it simple, here is an example: TEXT1.TXT --- contents: 9.9.9.9 geek.net 1.1.1.1 geek.com 2.2.2.2 leet.net TEXT2.TXT --- contents: geek.com coolbar.org I simply do: cat text1.txt | grep -f text2.txt >... (7 Replies)
Discussion started by: mirkocosta
7 Replies

10. Shell Programming and Scripting

Grep Script

Hi, New to scripting and looking for some help. I am trying to write a script that will search a specified directory for any new or modified files within the last 7 days and display the results. This will be ran daily and emailed? Thanks (18 Replies)
Discussion started by: Con592
18 Replies
pdfposter(1)															      pdfposter(1)

NAME
pdfposter - Scale and tile PDF images/pages to print on multiple pages. SYNOPSIS
pdfposter <options> infile outfile DESCRIPTION
Pdfposter can be used to create a large poster by building it from multple pages and/or printing it on large media. It expects as input a PDF file, normally printing on a single page. The output is again a PDF file, maybe containing multiple pages together building the poster. The input page will be scaled to obtain the desired size. The program uses a simple but efficient method which is possible with PDF: All new pages share the same data stream of the scaled page. Thus resulting file grows moderatly. To control its operation, you need to specify either the size of the desired poster or a scale factor for the image: o Given the poster size, it calculates the required number of sheets to print on, and from that a scale factor to fill these sheets opti- mally with the input image. o Given a scale factor, it derives the required number of pages from the input image size, and positions the scaled image centered on this area. OPTIONS
General Options --version Show program's version number and exit -h , --help Show help message and exit --help-media-names List available media and disctance names and exit -v , --verbose Be verbose. Tell about scaling, rotation and number of pages. Can be used more than once to increase the verbosity. -n , --dry-run Show what would have been done, but do not generate files. Defining Output -m BOX, --media-size=BOX Specify the desired media size to print on. See below for BOX. The default is A4 in the standard package. -p BOX, --poster-size=BOX Specify the poster size. See below for BOX. pdfposter will autonomously choose scaling and rotation to best fit the input onto the poster (see EXAMPLES below). If you give neither the -s nor the -p option, the default poster size is identical to the media size. -s NUMBER Specify a linear scaling factor to produce the poster. Together with the input image size and optional margins, this induces an output poster size. So don't specify both -s and -p. Default is deriving the scale factor to fit a given poster size. Box Definition The BOX mentioned above is a specification of horizontal and vertical size. The syntax is as follows (with multipier being specified optionally): box = [ multiplier ] unit multiplier = number "x" number unit = medianame or distancename Many international media names are recognised by the program, in upper and lower case, and can be shortened to their first few characters, as long as unique. For instance 'A0', 'Let'. Distance names are like 'cm', 'inch', 'ft'. Medias are typically not quadratic but rectangular, which means width and hight differ. Thus using medianames is a bit tricky: 10x20cm obviuos: 10 cm x 20 cm (portrait) 20x10cm same as 10x20cm, since all boxes are rotated to portrait format Now when using medianames it gets tricky: 1x1a4 same as approx. 21x29cm (21 cm x 29 cm, portrait) 1x2a4 same as approx. 21x58cm (21 cm x 58 cm, portrait) This are two a4 pages put together at the small side: One portrait page wide and two portrait pages high. 2x1a4 same as approx. 42x29cm, which is rotated to portrait and is the same a 29x42cm (29 cm x 42 cm) This are two a4 pages put together at the long side: Two portrait pages wide and one portrait page high. EXAMPLES
pdfposter -mA3 -pA0 a4.pdf out.pdf Prints an A4 input file on 8 A3 pages, forming an A0 poster. pdfposter -p3x3Let a4.pdf out.pdf Prints an inputfile on a poster of 3x3 Letter pages. pdfposter -mA0 input.pdf out.pdf Enlarges an inputfile to print on a large-media A0 capable device. pdfposter -s4 input.pdf out.pdf Enlarge an inputfile exactly 4 times, print on the default A4 media, and let pdfposter determine the number of pages required. pdfposter -m10x10cm -pa0 a4.pdf out.pdf Just to show how efficient pdfposter is: This will create a file containing 192 pages, but only 15 times as big as the single page. With a4.pdf being a quite empty page, this ratio should be even better for filled pages. More examples including sample pictures can be found at http://pdfposter.origo.ethz.ch/wiki/examples Examples for automatic scaling o For printing 2 portrait A4 pages high (approx. 58cm) and let pdfposter determine how many portrait pages wide, specify a lage number of vertical pages. eg: pdfposter -p999x2a4 testpage-wide.pdf out.pdf o For printing 2 landscape A4 pages high (approx. 20cm) and let pdfposter determine how many landscape pages wide, specify a lage number of horizontal pages. eg: pdfposter -p2x999a4 testpage-wide.pdf out.pdf SEE ALSO
poster(1) Project Homepage http://pdfposter.origo.ethz.ch/ AUTHOR
Hartmut Goebel <h.goebel@goebel-consult.de> COPYRIGHT
GNU Public Licence v3 (GPLv3) Version 0.4.4 pdfposter(1)
All times are GMT -4. The time now is 03:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy