Sponsored Content
Full Discussion: append to two files
Top Forums Shell Programming and Scripting append to two files Post 302599855 by Sara_84 on Sunday 19th of February 2012 12:57:13 AM
Old 02-19-2012
append to two files

I tried to write a script ( not working) to append first value from mylist to a file called my myfirstResult and to another called mysecondResult

Code:
 
awk ' {print $1} >> myfirsResult  ' < mylist
awk ' {print $1} >> mysecondResult  ' < mylist
 
$ cat mylist
 
A 02/16/2012
B 02/19/2012
C 02/20/2012
D 02/17/2012
E 02/16/2012

I need to append values to two files as following:

Code:
 
$ cat myfirsResult
 
A
B
C
D
E

and to another file mysecondResult with no new lines

Code:
 
$ cat mysecondResult
A B C D E

Thanks , Sara
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to append copyright to all files?

I have one file that contain copyright notice, that I would like to append to all files in our directory structure (excluding binaries). How can I do that? Thanks for your help! (3 Replies)
Discussion started by: SiftinDotCom
3 Replies

2. UNIX for Dummies Questions & Answers

append two files

Hi, I have two files where 1 contains data and the other contains strings eg file 1 -0.00000 0.00000 0.00000 0.00000 0.00000 0.80000 0.50000 0.50000 0.60000 0.50000 0.50000 0.20000 -0.00000 0.00000 0.40000 file 2 F F F F F F T T T T T T T T T How to I append file2 to file 1 to... (1 Reply)
Discussion started by: princessotes
1 Replies

3. UNIX for Dummies Questions & Answers

append files as columns

Hi, I will rephrase my question. I have two files: q16 1.341E+05 wf8 3.084E+02 total1 1.344E+05 ud35 5.694E+03 us38 9.367E+05 ya23r 9.414E+02 up23s 2.403E+04 io240 1.203E+04 q16 1.341E+05 wf8 3.084E+02 total1 1.344E+05 ud35 5.694E+03 us38 9.367E+05 (2 Replies)
Discussion started by: f_o_555
2 Replies

4. Shell Programming and Scripting

MV all files and append date

All, I am trying to setup a command that will mv all files in a directory to another location and append a filedate. for example: mv * /location/*'date %y%m%d' Any help? (2 Replies)
Discussion started by: markdjones82
2 Replies

5. Shell Programming and Scripting

Append all files in a folder

Hi All, I have directory in which I have around 50 files with filename as: abcs_1 afaa_2 asda_3 agfa_4 . . sada_50 I want to append all files in sada_50 i.e first ssdd_49 in sada_50. Then append asda_48 in (ssdd_49 in sada_50). As number of files are more I do not feel like... (7 Replies)
Discussion started by: pandeyak
7 Replies

6. UNIX for Dummies Questions & Answers

Append logs to files,

i want to collect new logs only from a existing logfile and the new logs should be written both existing logfile and a new file.. which command i have to use for this. Regards Vijay, (0 Replies)
Discussion started by: vijayq8
0 Replies

7. UNIX for Dummies Questions & Answers

Append Files

Hi All, I have to append 2 lines at the end of a text file. If those 2 lines are already there then do not append else append the 2 lines to the text file. Eg: I have a text file, file.txt This text file might look like this, /home/kp/make.jsp /home/pk/model.jsp I have to append... (1 Reply)
Discussion started by: pavan_test
1 Replies

8. Shell Programming and Scripting

Unzip all the files with subdirectories present and append a part of string from the main .zip files

Hi frnds, My requirement is I have a zip file with name say eg: test_ABC_UH_ccde2a_awdeaea_20150422.zip within that there are subdirectories on each directory we again have .zip files and in that we have files like mama20150422.gz and so on. Iam in need of a bash script so that it unzips... (0 Replies)
Discussion started by: Ravi Kishore
0 Replies

9. Shell Programming and Scripting

Append string to all the files inside a directory excluding subdirectories and .zip files

Hii, Could someone help me to append string to the starting of all the filenames inside a directory but it should exclude .zip files and subdirectories. Eg. file1: test1.log file2: test2.log file3 test.zip After running the script file1: string_test1.log file2: string_test2.log file3:... (4 Replies)
Discussion started by: Ravi Kishore
4 Replies

10. UNIX for Beginners Questions & Answers

How to append two fasta files?

I have two fasta files as shown below, File:1 >Contig_1:90600-91187 AAGGCCATCAAGGACGTGGATGAGGTCGTCAAGGGCAAGGAACAGGAATTGATGACGGTC >Contig_98:35323-35886 GACGAAGCGCTCGCCAAGGCCGAAGAAGAAGGCCTGGATCTGGTCGAAATCCAGCCGCAG >Contig_24:26615-28387... (11 Replies)
Discussion started by: dineshkumarsrk
11 Replies
SIMPLIFY(1)						      General Commands Manual						       SIMPLIFY(1)

NAME
simplify - a script to simplify a MIME message SYNOPSIS
simplify [args ...] < message > othermessage DESCRIPTION
This manual page documents briefly the simplify command. simplify is a Perl script to simplify a MIME message. This script never loads the entire message into memory, but does dump it's entire contents to disk once. OPTIONS
mime=no Don't use MIME, no HTML mail allowed. testing=yes Run in testing mode (suppress randonmess) saveall=yes Save all attachments to files. temp=/path/to/working/dir/ Defaults to /tmp. url=http://box/path/ URL-prefix for printing paths to attachments header=text... Text preceding the attachment URL list. textsig=/path/to/file Text signature to append to text parts. htmlsig=/path/to/file HTML signature to append to HTML parts. If "saveall" is yes, then the script will save all attachments to disk so people can access their contents later. If an URL is specified then that automatically implies "saveall=yes". Without this, the default behavior is to only save text and html parts, and delete them and all working directories when the script is finished. SEE ALSO
sanitizer(1). More info on configuration: /usr/share/doc/sanitizer/sanitizer.html AUTHOR
Bjarni R. Einarsson <bre@klaki.net> This manual page was written by Alberto Gonzalez Iniesta <agi@agi.as> for the Debian GNU/Linux system (but may be used by others). May 14, 2003 SIMPLIFY(1)
All times are GMT -4. The time now is 07:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy