Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How do I copy from windows clipboard into VI session? Post 302769457 by gary_w on Tuesday 12th of February 2013 10:33:50 AM
Old 02-12-2013
I see your sed, and raise you a find. This will add the contents of "/path/to/file.addition" to the top of every file found.
Code:
find . -name /files/to/edit -exec ksh -c 'cat /path/to/file.addition $1 > $1.changed' _ {} \;

It should use xargs instead if the list returned is too big.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

automatic login from windows by a telnet session

Help me please, I wanna know if it's possible to define in windows the option when somebody starts a telnetsession to a unix machine it automatically logs in with the username and password of this user. Or if there is a possibility to set the username and password to an Icon on the users... (3 Replies)
Discussion started by: Herwin
3 Replies

2. Shell Programming and Scripting

Automatic Copy of File Contents to Clipboard

Could someone show me how to copy the contents of a file to the clipboard automatically without manually selecting its contents? I just want to press the "Paste Key" to show the results. I wish to use this in a ksh script. I'm using Solaris. Thanks! (5 Replies)
Discussion started by: ilak1008
5 Replies

3. UNIX for Dummies Questions & Answers

Copy text from a file from VI editor to Windows clipboard

Copy text from a file from VI editor to Windows clipboard, I mean copy entire file in vi editor to notepad. (13 Replies)
Discussion started by: zhshqzyc
13 Replies

4. Solaris

NXClient/x-windows session without graphical workstation

I will preface this question with it has been a long time since I worked on Solaris and even then I wasn't that good :-) I have a Solaris server at my fingertips and I would like to test running multiple instances of an open source EMR (Java Swing application) from the server over the WAN. ... (1 Reply)
Discussion started by: caultonpos
1 Replies

5. UNIX for Advanced & Expert Users

Xserver connect and run CDE session from Windows PC

Hope someone can help. I have 5 Unix Tru64 ver 4.0/5.1B, boxes and I'm trying to connect and run CDE session from my PC. I have tried using Reflections, and Xming with no luck. Can someone tell me what exactly needs to be running on the Tru64 boxes in order for this to work. Along with what or how... (4 Replies)
Discussion started by: Troberts50
4 Replies

6. UNIX for Dummies Questions & Answers

Copy entire contents of file to clipboard

Hi, I am trying to figure out how to copy the contents of a file to the clipboard, then paste into a command. i.e copy contents of file /path/filename.txt to <command> <paste text> Hope that makes sense. Basically tryting to copy the text for use in a command without having to open the... (8 Replies)
Discussion started by: JCA70
8 Replies

7. UNIX for Advanced & Expert Users

Xterm configuration : how to copy/paste in the CLIPBOARD

Hi, I can paste what is in the CLIPBOARD but I can't get xterm copy. and in fact I think I'm not able to select well with the cursor (I don't want to use the mouse)... here is my ~/.Xresources file : XTerm*highlightSelection: true XTerm*VT100.translations: #override \n\ None ... (5 Replies)
Discussion started by: xib.be
5 Replies

8. Shell Programming and Scripting

Unix shell script to Copy files from one Windows server to another Windows server.

Can anybody please help me on how to code for the below requirement: I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
4 Replies

9. IP Networking

IPerf and windows copy

Hi, Some of my backups were running slow, so i decided to use iperf to check network throughput. Between 2 windows systems (on the same switch) i got about 1-2MB. However, when i tried to copy some files from the on windows server to the other i got around 10-12MB. This is over a 1Gig link. ... (1 Reply)
Discussion started by: Mack1982
1 Replies

10. Solaris

Solaris 10 : command to copy text to the clipboard.

I'm searching a command to copy text to the clipboard. xclip and xsel are commands which are available on several kind Linux and Unix OS, but is unfortenuately not available on solaris 10. REF : xpt.sourceforge.net/techdocs/nix/x/general/xwin12-Xclipboard/single/ clipboard of openSolaris is... (9 Replies)
Discussion started by: droopy4u
9 Replies
DwtStartCopyToClipboard(3Dwt)											     DwtStartCopyToClipboard(3Dwt)

Name
       DwtStartCopyToClipboard - Sets up storage and data structures to receive clipboard data.

Syntax
       int DwtStartCopyToClipboard(display, window, clip_label,
				  time, widget, callback, item_id)
	    Display *display;
	    Window window;
	    DwtCompString clip_label;
	    Time time;
	    Widget widget;
	    VoidProc callback;
	    long *item_id;

Arguments
       display	 Specifies  a pointer to the Display structure that was returned in a previous call to XOpenDisplay.  For information on XOpenDis-
		 play and the Display structure, see the Guide to the Xlib Library: C Language Binding.

       window	 Specifies the window ID that relates the application window to the clipboard.	The same application instance should pass the same
		 window ID to each clipboard function that it calls.

       clip_label
		 Specifies  the  label	to  be	associated with the data item.	This argument is used to identify the data item, for example, in a
		 clipboard viewer.  An example of a label is the name of the application that places the data in the clipboard.

       time	 Specifies the timestamping of the event that triggered the copy.

       widget	 Specifies the ID of the widget that will receive messages requesting data previously passed  by  name.   This	argument  must	be
		 present in order to pass data by name.  Any valid widget ID in your application can be used.  All message handling is done by the
		 cut and paste functions.

       callback  Specifies the address of the callback function that is called when the clipboard needs data that was originally passed  by  name.
		 This  is  also  the  callback to receive the DELETE message for items that were originally passed by name.  This argument must be
		 present in order to pass data by name.

       item_id	 Specifies the number assigned to this data item.  The application uses this number in calls to DwtCopyToClipboard,  DwtEndCopyTo-
		 Clipboard, and DwtCancelCopyToClipboard.

Description
       The  DwtStartCopyToClipboard  function sets up storage and data structures to receive clipboard data.  An application calls DwtStartCopyTo-
       Clipboard during a cut or copy operation.  The data item that these structures receive through calls to DwtCopyToClipboard then becomes the
       next item to be pasted (the next-paste item) in the clipboard after the call to DwtEndCopyToClipboard.

       DwtStartCopyToClipboard is like DwtBeginCopyToClipboard except that it has the time argument to support the ICCCM clipboard selection mech-
       anism.  To perform cut and paste operations between your application and an application using the ICCCM clipboard selection mechanism,  you
       must use DwtStartCopyToClipboard and provide a timestamping value for time, not a CurrentTime value.  Use of the value CurrentTime for time
       may cause the ICCCM interface to fail.

       The window and callback arguments must be present in order to pass data by name.

       The callback format is as follows:

       function name(widget, data_id, private_id, reason)
	    Widget *widget;
	    int *data_id;
	    int *private_id;
	    int *reason;

       widget	 Specifies the ID of the widget passed to DwtStartCopyToClipboard.

       data_id	 Specifies the identifying number returned by DwtCopyToClipboard, which identifies the pass-by-name data.

       private_id
		 Specifies the private information passed to DwtCopyToClipboard.

       reason	 Specifies the reason, which is either DwtCRClipboardDataDelete or DwtCRClipboardDataRequest.

Return Values
       This function returns one of these status return constants:

       ClipboardSuccess   The function is  success-
			  ful.
       ClipboardLocked	  The	 function    failed
			  because the clipboard was
			  locked  by another appli-
			  cation.  The	application
			  can  continue to call the
			  function  with  the  same
			  parameters	until	the
			  clipboard  is   unlocked.
			  Optionally,  the applica-
			  tion can ask if the  user
			  wants  to  keep trying or
			  to give up on the  opera-
			  tion.

See Also
       DwtCopyToClipboard(3Dwt), DwtEndCopyToClipboard(3Dwt), DwtCancelCopyToClipboard(3Dwt), DwtBeginCopyToClipboard(3Dwt)
       Guide to the XUI Toolkit: C Language Binding
       Guide to the XUI Toolkit Intrinsics: C Language Binding

														     DwtStartCopyToClipboard(3Dwt)
All times are GMT -4. The time now is 02:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy