Sponsored Content
Top Forums Shell Programming and Scripting cutting a section of a big file Post 302216934 by joeyg on Monday 21st of July 2008 02:00:56 PM
Old 07-21-2008
Tools can use a head and tail command

Code:
head -1100 file1 | tail -101 > file2

Note that I took the first 1100 lines of file, and then 101 (one hundred plus one) lines to get the exact request. There would be 101 lines of data for file lines 1000-1100.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to view a big file(143M big)

1 . Thanks everyone who read the post first. 2 . I have a log file which size is 143M , I can not use vi open it .I can not use xedit open it too. How to view it ? If I want to view 200-300 ,how can I implement it 3 . Thanks (3 Replies)
Discussion started by: chenhao_no1
3 Replies

2. Shell Programming and Scripting

Cutting last few characters of file name

Dear Friends, Here I have two queries. 1. Want to make folder named as last three characters of a file name (length of file name can vary file to file) E.g File name is AAAACCCCBBBB.txt (12 Characters excluding file extension) then folder to be created is BBB Irrespective of... (7 Replies)
Discussion started by: anushree.a
7 Replies

3. UNIX for Dummies Questions & Answers

How big is too big a config.log file?

I have a 5000 line config.log file with several "maybe" errors. Any reccomendations on finding solvable problems? (2 Replies)
Discussion started by: NeedLotsofHelp
2 Replies

4. Shell Programming and Scripting

Extract section of file based on word in section

I have a list of Servers in no particular order as follows: virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"And I am generating some output from a pre-existing script that gives me the following (this is a sample output selection). 9/17/2010 8:00:05 PM: Normal backup using VDRBACKUPS... (2 Replies)
Discussion started by: jelloir
2 Replies

5. Shell Programming and Scripting

Cutting file name from end

Dear Friends, I want to take last 10 characters of a file name in a variable. E.g. file name is 123432311234567890.txt then we want "1234567890" to be taken in an variable. Request you to guide me to do the same Thanks in anticipation Anushree (7 Replies)
Discussion started by: anushree.a
7 Replies

6. Shell Programming and Scripting

Delete a section of a file if...

i have a file as below that has n section : 2006 0101 1236 49.3 L 37.902 48.482 0.0 Teh 5 0.2 2.7LTeh 1 GAP=238 E Iranian Seismological Center, Institute of Geophysics, University of Tehran 6 ... (5 Replies)
Discussion started by: oreka18
5 Replies

7. Shell Programming and Scripting

Fetch a section from a file

Hi, I have a file like... $cat file1 +++++++++++++++++++ client1 +++++++++++++++++++++++++++++ col1 col2 col3 ------ ----- ----- (0 rows affected) ========================================================= +++++++++++++++++++ client1 +++++++++++++++++++++++++++++ col1 col2 col3... (6 Replies)
Discussion started by: sam05121988
6 Replies

8. Shell Programming and Scripting

Cutting string values from a file

My file looks like this.... User:SYSTEM,O/S User:oracle,Process:3408086,Machine:hostname ,Program:sqlplus@hostname (TNS V1-V,Logon Time:25-JUL-20 14 13:36 I want to get the date and time which is displayed after the 'Logon time'. (5 Replies)
Discussion started by: Nagesh_1985
5 Replies

9. Shell Programming and Scripting

awk to lookup section of file in a range of another file

In the below, I am trying to lookup $1 and $2 from file1, in a range search using $1 $2 $3 of file2. If the search key from file1 is found in file2, then the word low is printed in the last field of that line in the updated file1. Only the last section of file1 needs to be searched, but I am not... (6 Replies)
Discussion started by: cmccabe
6 Replies

10. Shell Programming and Scripting

How to segregate a section from big file?

Hello, I need to know all IP range (ip_prefix), associated with us-west-2 region only from this link - https://ip-ranges.amazonaws.com/ip-ranges.json (it can be opened in wordpad for better visibility) Please suggest, how would I do it. If vi, awk or sed is needed, I have downloaded it on my... (7 Replies)
Discussion started by: solaris_1977
7 Replies
PS_SET_TEXT_POS(3)							 1							PS_SET_TEXT_POS(3)

ps_set_text_pos - Sets position for text output

SYNOPSIS
bool ps_set_text_pos (resource $psdoc, float $x, float $y) DESCRIPTION
Set the position for the next text output. You may alternatively set the x and y value separately by calling ps_set_value(3) and choosing textx respectively texty as the value name. If you want to output text at a certain position it is more convenient to use ps_show_xy(3) instead of setting the text position and call- ing ps_show(3). PARAMETERS
o $psdoc - Resource identifier of the postscript file as returned by ps_new(3). o $x - x-coordinate of the new text position. o $y - y-coordinate of the new text position. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Placing text at a given position <?php $ps = ps_new(); if (!ps_open_file($ps, "text.ps")) { print "Cannot open PostScript file "; exit; } ps_set_info($ps, "Creator", "rectangle.php"); ps_set_info($ps, "Author", "Uwe Steinmann"); ps_set_info($ps, "Title", "Text placement example"); ps_begin_page($ps, 596, 842); $psfont = ps_findfont($ps, "Helvetica", "", 0); ps_setfont($ps, $psfont, 8.0); ps_show_xy($ps, "Some text at (100, 100)", 100, 100); ps_set_value($ps, "textx", 100); ps_set_value($ps, "texty", 120); ps_show($ps, "Some text at (100, 120)"); ps_end_page($ps); ps_delete($ps); ?> SEE ALSO
ps_set_value(3), ps_show(3). PHP Documentation Group PS_SET_TEXT_POS(3)
All times are GMT -4. The time now is 06:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy