Sponsored Content
Full Discussion: asdas
Top Forums UNIX for Advanced & Expert Users asdas Post 302490124 by appualex on Monday 24th of January 2011 03:31:26 AM
Old 01-24-2011
Copy Paste

Hi, I would like to know how can i copy a portion of the file and paste it in another file as follows.
File 1:

Code:
    Hello, a greeting in the English language
    Hi (magazine), teen lifestyle publication
    Hi (kana), Japanese character
    Hi Records, in music, a Memphis soul and rockabilly label
    Hi, mobile phone brand of Dutch company KPN


File 2:

Code:
  12345
  45637678863
  21
  0997636t374387
  5464646

I need to copy the contents of file 2 and add it to file 1 to create a file as follows.

Code:
    Hello, a greeting in the English language 12345
    Hi (magazine), teen lifestyle publication  45637678863
    Hi (kana), Japanese character  21
    Hi Records, in music, a Memphis soul and rockabilly label  0997636t374387
    Hi, mobile phone brand of Dutch company KPN  5464646

I heard some how in VI editor we can copy and paste. But cant find out how!!


Thanks in Advance!!!!

Appu

Last edited by appualex; 01-24-2011 at 04:38 AM..
 
PASTE(1)							   User Commands							  PASTE(1)

NAME
paste - merge lines of files SYNOPSIS
paste [OPTION]... [FILE]... DESCRIPTION
Write lines consisting of the sequentially corresponding lines from each FILE, separated by TABs, to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -d, --delimiters=LIST reuse characters from LIST instead of TABs -s, --serial paste one file at a time instead of in parallel --help display this help and exit --version output version information and exit AUTHOR
Written by David M. Ihnat and David MacKenzie. REPORTING BUGS
Report paste bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report paste translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for paste is maintained as a Texinfo manual. If the info and paste programs are properly installed at your site, the command info coreutils 'paste invocation' should give you access to the complete manual. GNU coreutils 8.5 February 2011 PASTE(1)
All times are GMT -4. The time now is 03:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy