Sponsored Content
Top Forums Shell Programming and Scripting [solved] merging two files and writing to another file- solved Post 302460839 by danmero on Thursday 7th of October 2010 06:41:09 PM
Old 10-07-2010
What about paste Smilie
Code:
paste -d= file2 file1

 

10 More Discussions You Might Find Interesting

1. HP-UX

[Solved] Deleting a all core files present in file systems ?

Hi All IN HPUX 11 How to delete an unwanted "core" file with a single command which is being generated in different locations of the system the command should be able to free up the space occupied by all "core" file which is present in different folders and filesytems in a system ... (5 Replies)
Discussion started by: sidharthmellam
5 Replies

2. Shell Programming and Scripting

write to multiple files depending on file type (solved)

I want a script that will add comments to a file before check-in files. comments depend on type of files. i have a script to list files in the directory that will be checked-in There are xml, js, html, vm files. vm will use comments like c/c++ ( // or /*..*/) can you help me add a comment line... (0 Replies)
Discussion started by: pradeepmacha
0 Replies

3. Shell Programming and Scripting

[Solved] combine two files

All, I have two files. each file contain same number of lines. means if file 1 contain 10 line then file 2 also contain 10 line. 1. scp userid@server:/tmp/a1.txt scp userid@server:/tmp/a2.txt scp userid@server:/var/adm/a3.txt 2. /tmp/ /tmp/ /var/adm/ Now I want my O/P as... (2 Replies)
Discussion started by: anshu ranjan
2 Replies

4. UNIX for Dummies Questions & Answers

[Solved] take name of directory and files as variables

hi, want to create script that takes name of directory and all files and will copy each file to new directory. then fix errors like files do not exist or no permission to create new directory... these what I have so far... #!/bin/sh dir=~/Documents/Scripts/Copy for i in $(pwd) $(ls)... (23 Replies)
Discussion started by: me.
23 Replies

5. Shell Programming and Scripting

The -f switch is not identifying files[solved]

(1 Reply)
Discussion started by: lowExpectations
1 Replies

6. Shell Programming and Scripting

[solved]compare two files

I have to files. One file contains two fields: server|userThe other files contains records with 13 fields (always 13). The fields to match on are 3 and 5, but I want to output the whole record. I have been trying this over and over with not much success, or at least inaccurate success. Here is my... (0 Replies)
Discussion started by: dagamier
0 Replies

7. UNIX for Dummies Questions & Answers

[Solved] Writing a loop to changing the names of files in a directory

Hi, I would like to write a loop to change the names of files in a directory. The files are called data1.txt through data1000.txt. I'd like to change their names to a1.txt through a1000.txt. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies

8. Programming

[Solved] Cannot execute file that include files

Iam trying to execute a file that include many files but it seems my main copy.c can't read anyone of them ----------------------------------------------------------------------------------------- Copy.c #include <sys/stat.h> #include <fcntl.h> #include "tlpi_hdr.h" #ifndef BUF_SIZE /*... (2 Replies)
Discussion started by: fwrlfo
2 Replies

9. Shell Programming and Scripting

[Solved] Writing output to the console

Hi All, I have written one script in which am writting the result to the log file. I want to display the results on the console also if ; then echo "$result doesnot match with the host file">>InputHostsFileErrors.txt else echo "$result input matches with the host... (7 Replies)
Discussion started by: sharsour
7 Replies

10. Shell Programming and Scripting

[Solved] awk compare two different columns of two files and print all from both file

Hi, I want to compare two columns from file1 with another two column of file2 and print matched and unmatched column like this File1 1 rs1 abc 3 rs4 xyz 1 rs3 stu File2 1 kkk rs1 AA 10 1 aaa rs2 DD 20 1 ccc ... (2 Replies)
Discussion started by: justinjj
2 Replies
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/> COPYRIGHT
Copyright (C) 2009 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 7.1 July 2010 PASTE(1)
All times are GMT -4. The time now is 07:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy