Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to write a region of a file to another file with "less"? Post 302396011 by dkarr on Wednesday 17th of February 2010 12:48:56 PM
Old 02-17-2010
How to write a region of a file to another file with "less"?

I know about markers in "less", and I know about the "pipe" command, but what I need to do is write a region of a file to another file. I can set the mark and move to the end of the region I want to save and then pipe that region to something, but I'm not sure what that "something" would be to let me write that region to another file.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

communicating wth another user aside from "wall" and "write"

Hi, Can anyone suggest a Unix command or c-shell algorithm to simulate to behavior of "wall" command minus the "all users"? What I'm trying to do is to send a notice to just one particular user but i dont want other remotely-logged-on users to receive the message (on the pseudo-terminals). I... (6 Replies)
Discussion started by: Deanne
6 Replies

2. Shell Programming and Scripting

script to read a line with spaces bet " " and write to a file

Hi, I need a command in UNIX KSH below is the description... MAPPING DESCRIPTION ="Test Mapping for the calid inputs" ISVALID ="YES" NAME ="m_test_xml" OBJECTVERSION ="1" VERSIONNUMBER ="1" unix ksh command to read the DESCRIPTION and write to a file Test Mapping for the calid inputs... (3 Replies)
Discussion started by: perlamohan
3 Replies

3. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

How to Write sftp through "expect" for file upload ?

Hi Experts , I am new to unix programming please tell me how to write expect and hoe to call it for automated file upload process. help me really ! (0 Replies)
Discussion started by: kulbhushan
0 Replies

6. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

7. Shell Programming and Scripting

finding the strings beween 2 characters "/" & "/" in .txt file

Hi all. I have a .txt file that I need to sort it My file is like: 1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO) 2- ... (10 Replies)
Discussion started by: Behrouzx77
10 Replies

8. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
XIntersectRegion(3X11)						     MIT X11R4						    XIntersectRegion(3X11)

Name
       XIntersectRegion, XUnionRegion, XUnionRectWithRegion, XSubtractRegion, XXorRegion, XOffsetRegion, XShrinkRegion - region arthmetic

Syntax
       XIntersectRegion(sra, srb, dr_return)
	  Region sra, srb, dr_return;

       XUnionRegion(sra, srb, dr_return)
	  Region sra, srb, dr_return;

       XUnionRectWithRegion(rectangle, src_region, dest_region_return)
	  XRectangle *rectangle;
	  Region src_region;
	  Region dest_region_return;

       XSubtractRegion(sra, srb, dr_return)
	  Region sra, srb, dr_return;

       XXorRegion(sra, srb, dr_return)
	  Region sra, srb, dr_return;

       XOffsetRegion(r, dx, dy)
	  Region r;
	  int dx, dy;

       XShrinkRegion(r, dx, dy)
	  Region r;
	  int dx, dy;

Arguments
       dest_region_return
		 Returns the destination region.

       dr_return Returns the result of the computation.  ds Dy move or shrink

       dx
       dy	 Specify the x and y coordinates, which define the amount you want to  the specified region.

       r	 Specifies the region.

       rectangle Specifies the rectangle.

       sra
       srb	 Specify the two regions with which you want to perform the computation.

       src_region
		 Specifies the source region to be used.

Description
       The function computes the intersection of two regions.

       The function computes the union of two regions.

       The function updates the destination region from a union of the specified rectangle and the specified source region.

       The function subtracts srb from sra and stores the results in dr_return.

       The function calculates the difference between the union and intersection of two regions.

       The function moves the specified region by a specified amount.

       The function reduces the specified region by a specified amount.  Positive values shrink the size of the region, and negative values expand
       the region.

See Also
       XCreateRegion(3X11), XDrawRectangle(3X11), XEmptyRegion(3X11)
       X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys

															    XIntersectRegion(3X11)
All times are GMT -4. The time now is 03:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy