Sponsored Content
Full Discussion: Question on Paste command
Top Forums UNIX for Dummies Questions & Answers Question on Paste command Post 302099683 by mudhireddy on Wednesday 13th of December 2006 10:51:38 AM
Old 12-13-2006
I dont think sed will work because data in FILE can contain TABS, if we replace TABS, original data will also get replaced.

I got the answer , anyway Thanks

yes "" |head -`wc -l FILE_1 | awk '{print $1}'` | paste FILE_1 - FILE_2

This will add two tabs and if you want 3 tabs you can do

yes "" |head -`wc -l FILE_1 | awk '{print $1}'` | paste FILE_1 - - FILE_2

assumption is file_1 and file_2 of same length here
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

paste command

I wonder if any body can help me with a command i am struggling with. I have a file with around 400 lines in, in a program i have it pulls out each line at a time so that data from the line can be cross referenced with another file. If it finds a match it pulls out a ocde from the second file, this... (5 Replies)
Discussion started by: mariner
5 Replies

2. Shell Programming and Scripting

command paste with variables

Hi. I have an interesting problem and i couldn't find out the solution. I have two variables in which there are a lot of lines finished by \n. I would like to concatenate this two variables into one in this format: var1var2 var1var2 . . . I could do this simply by command paste but it works... (32 Replies)
Discussion started by: samos
32 Replies

3. UNIX for Dummies Questions & Answers

paste command

input1 15 150 input2 x 10 100 input3 y 20 200 z 34 44 cmd paste -d "\t" input1 input2 input3 >>output output (1 Reply)
Discussion started by: repinementer
1 Replies

4. UNIX for Dummies Questions & Answers

Need help with using cut and paste command

I have a file which contains 3 fields separated by tabs example andrew kid baker I need to swap kid and baker using cut and paste commands how is this to be done? Thanks (1 Reply)
Discussion started by: drew211
1 Replies

5. Shell Programming and Scripting

need help with cut and paste command

I have a file which contains 3 fields separated by tabs example andrew kid baker I need to swap kid and baker using cut and paste commands how is this to be done? Thanks (3 Replies)
Discussion started by: drew211
3 Replies

6. Shell Programming and Scripting

Can't paste in command line.

Hello. I've made a simple script which asks the user to input a hash and then runs a command that replaces the variable $hash with what the user inserted. The ting is that when the programm asks for input I can't paste anything there..! any clues?? :wall: (8 Replies)
Discussion started by: louboulos
8 Replies

7. Shell Programming and Scripting

Paste command - question

Hi, Below file content is output from pasting two files. Now, i want to output another file which just contains the difference on any line For example: JAY,2,,3,5,B+,JAY,2,,3,5,B+ ANN,5,,5,1,C,ANN,5,,5,2,C Line JAY seems to have no difference. However, line ANN has difference in on... (3 Replies)
Discussion started by: jakSun8
3 Replies

8. Shell Programming and Scripting

Copy a column and paste to other file question

Please help me. This is simple, but urgent problem for me. :( I have a two files file1 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 ..... file2 11 12 13 14 15 11 12 13 14 15 11 12 13 14 15 ..... 1) I hope to make a new file, file 3, that consists of 2nd... (2 Replies)
Discussion started by: exsonic
2 Replies

9. Shell Programming and Scripting

Need help with paste command using variables

How can I accomplish this? I basically want to merge two variables onto the same line. I can do it with two FILES this way: $ cat /tmp/users_in.list | awk -F "," '{print $2}' | cut -c -1 > first.initial $ awk -F "," '{print $1}' /tmp/users_in.list | awk '{print $1}' > last.name $ paste... (5 Replies)
Discussion started by: greenlightening
5 Replies

10. Shell Programming and Scripting

Issue with paste command

Hi, I am facing issue with paste command. It is adding spaces or tab in between. I have say 3 files with below data File_1 TH THI THIS I File_2 IS IS S IS RE S File_3 RECORD 1 CORD 2 IS RECORD 3 (3 Replies)
Discussion started by: Simanto
3 Replies
MODERATORS(5)							File Formats Manual						     MODERATORS(5)

NAME
moderators - submission addresses for moderated newsgroups DESCRIPTION
When an unapproved article is posted locally to a moderated newsgroup, rather than being passed off to innd(8) for normal handling, it's instead sent via e-mail to the submission address for that newsgroup. The file <pathetc in inn.conf>/moderators lists the submission addresses for moderated newsgroups. This file is used by nnrpd(8), inews(1), and any other program that uses the GetModeratorAddress() routine (see libinn(3).) The moderators file is a list of associations between wildmat(3) patterns matching newsgroups and the submission address for those news- groups. Blank lines and lines starting with a number sign (``#'') are ignored. All other lines should consist of those two fields sepa- rated by a colon. The second field, the submission address, may have at most one %s anywhere in it; if present, this will be replaced by the name of the newsgroup with periods replaced by dashes. If there is a literal ``%'' in the submission address, it must be written as ``%%'' (even if not followed by an ``s''). Here is a sample file: example.important:announce-request@example.com example.*:%s@smtp.example.com gnu.*:%s@prep.ai.mit.edu *:%s@moderators.isc.org Using the above file, postings to the moderated newsgroup in the left column will be sent to the address shown in the right column: example.important announce-request@example.com example.x.announce example-x-announce@smtp.example.com gnu.emacs.sources gnu-emacs-sources@prep.ai.mit.edu comp.sources.unix comp-sources-unix@moderators.isc.org Periods are converted to dashes for historical reasons, from back in the days when periods in the local part of addresses may not be han- dled correctly. It's probably no longer necessary, but so much now depends on it that it can't be easily changed. It's intended that the sample moderators file included in the INN distribution always be sufficient for all world-wide newsgroups. The hosts behind moderators.isc.org have graciously volunteered to handle forwarding tasks for all world-wide newsgroups so that individual sites don't have to keep track of the submission addresses for moderated groups. The forwarding database used by moderators.isc.org is coordinated by moderators-request@isc.org; if you know of a world-wide newsgroup hierarchy that is not correctly handled by modera- tors.isc.org, please send the details to that address. Given that, the only thing you should have to add to the sample file under normal circumstances are the forwarding addresses for local or limited distribution moderated groups. HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.6, dated 1999/05/09. SEE ALSO
inews(1), inn.conf(5), libinn(3), wildmat(3). MODERATORS(5)
All times are GMT -4. The time now is 01:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy