Sponsored Content
Top Forums Shell Programming and Scripting Making file with values from different files Post 302243521 by er_aparna on Monday 6th of October 2008 03:03:39 AM
Old 10-06-2008
Making file with values from different files

Hello,

I am stuck up in middle of a script.Pls have a look at the problem and help me in any way out for the same.

There are n number of files with n number of contents in a column.
for example :
file1 has contents in quotes
"abcd"
"1234-asbcd"
"12312".....

file2 has contents in quotes
"123csdfd"
"qwdqdq"
"qweqe"......

file3 has contents in quotes
"123csdfQ13"
"qwdqd12"
"qweqe111"......

and so on ........

The desired output which is expected is as below :
output file -----
fileoutput.abcd,NAME="abcd",ID="123csdfd",DESC="123csdfQ13";
fileoutput.abcd,NAME="1234-asbcd",ID="qwdqdq",DESC="qwdqd12";
fileoutput.abcd,NAME="12312",ID="qweqe",DESC="qweqe111";
.......
and so on .


I have tried many things like while loop, for loop but got no success

can anyone pls help urgently

Thanks inadvance
Aparna
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Searching data files for another file of values

I've used awk for some simple scripting, but having trouble figuring out how to search a couple of data files that have Name/Address/Zip Codes from another file that has list of only Zip Codes, and write out the lines that matched. Zip code field in the data file is 27 I was thinking... (5 Replies)
Discussion started by: matkins99
5 Replies

2. Shell Programming and Scripting

Join two files values duplciating first file

Hi all, I am tryin to join two files, duplicating the alues from the first one as many times as the second. File one : 11 211 File two: a b c Result: 11 211 a 11 211 b 11 211 c Any advise will be apreciate. Thanks (3 Replies)
Discussion started by: valigula
3 Replies

3. UNIX for Advanced & Expert Users

Parse text file values and send those files as an attachment

We have these files in say \home\abcd\dm Summary.txt log_SI-100.lst log_SI-101.lst log_SI-106.lst The contents of Summary.txt is as below ./log_SI-100.lst:Error detected, rollbacking ./log_SI-101.lst:Error detected, rollbacking ./log_SI-106.lst:Error detected, rollbacking Now i... (5 Replies)
Discussion started by: depakjan
5 Replies

4. Shell Programming and Scripting

Putting together all values from different files in one file

Hi All, This is what I am trying to achieve but to no avail. I have three sets of files which are: 1. One big dictionary file which looks like this: apple orange computer pear country 2. Some thousands of text files which are named as 1.dat, 2.dat, 3.dat etc The text files... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies

5. Shell Programming and Scripting

Cat Values from Several files if it meets criteria for column values

I have results from some statistical analyses. The format of the results are as given below: I want to select lines that have a p-value (last column) less than 0.05 from all the results files (*.results) and cat to a new results file. It would be very nice if a new column is added that tells... (2 Replies)
Discussion started by: genehunter
2 Replies

6. Shell Programming and Scripting

Compare values in two files. For matching rows print corresponding values from File 1 in File2.

- I have two files (File 1 and File 2) and the contents of the files are mentioned below. - I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2. - I tried to modify and use... (10 Replies)
Discussion started by: Santoshbn
10 Replies

7. Shell Programming and Scripting

How to add values of two files and result in third file

Hi, I am new to shellscripting, I have two files as below File1: Abcdefg110111xyza000000600000000024.020000060000000000024.020000004660000000003.41000000000010000000100.000000000123 File 2:... (3 Replies)
Discussion started by: rajendrabujji
3 Replies

8. Shell Programming and Scripting

Query the table and return values to shell script and search result values from another files.

Hi, I need a shell script, which would search the result values from another files. 1)execute " select column1 from table_name" query on the table. 2)Based on the result, need to be grep from .wft files. could please explain about this.Below is the way i am using. #!/bin/sh... (4 Replies)
Discussion started by: Rami Reddy
4 Replies

9. Shell Programming and Scripting

Replace two values in a file with input from two different files

Hi, I was having the following issue cat input hello1, my name is unix.com. I am awesome. Hope you know this, hello2! cat hello1.txt Hi Friends Hi Folks Hi Well-Wishers cat hello2.txt Honey Sweety Darling Required Output (8 Replies)
Discussion started by: jacobs.smith
8 Replies
DH_COMPRESS(1)							     Debhelper							    DH_COMPRESS(1)

NAME
dh_compress - compress files and fix symlinks in package build directories SYNOPSIS
dh_compress [debhelperoptions] [-Xitem] [-A] [file...] DESCRIPTION
dh_compress is a debhelper program that is responsible for compressing the files in package build directories, and makes sure that any symlinks that pointed to the files before they were compressed are updated to point to the new files. By default, dh_compress compresses files that Debian policy mandates should be compressed, namely all files in usr/share/info, usr/share/man, files in usr/share/doc that are larger than 4k in size, (except the copyright file, .html and other web files, image files, and files that appear to be already compressed based on their extensions), and all changelog files. Plus PCF fonts underneath usr/share/fonts/X11/ FILES
debian/package.compress These files are deprecated. If this file exists, the default files are not compressed. Instead, the file is ran as a shell script, and all filenames that the shell script outputs will be compressed. The shell script will be run from inside the package build directory. Note though that using -X is a much better idea in general; you should only use a debian/package.compress file if you really need to. OPTIONS
-Xitem, --exclude=item Exclude files that contain item anywhere in their filename from being compressed. For example, -X.tiff will exclude TIFF files from compression. You may use this option multiple times to build up a list of things to exclude. -A, --all Compress all files specified by command line parameters in ALL packages acted on. file ... Add these files to the list of files to compress. CONFORMS TO
Debian policy, version 3.0 SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Joey Hess <joeyh@debian.org> 9.20120909 2012-05-19 DH_COMPRESS(1)
All times are GMT -4. The time now is 08:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy