Sponsored Content
Top Forums Shell Programming and Scripting Reading specific contents from 1 input files and appending it to another input file Post 302276406 by Franklin52 on Tuesday 13th of January 2009 03:49:08 PM
Old 01-13-2009
Try this:

Code:
awk -F",| |\\\." 'NR==FNR{a[$1]=$2;next}
$5 in a{print a[$5] "," $0}' file3 file1

Regards
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading specific contents from a file and appending it to another file

Hi, I need to write a shell script (ksh) to read contents starting at a specific location from one file and append the contents at specific location in another file. Please find below the contents of the source file that I need to read the contents from, File 1 -----# more... (5 Replies)
Discussion started by: dnicky
5 Replies

2. Shell Programming and Scripting

awk reading 2 input files but not getting expected value

I'm reading 2 input files but not getting expected value. I should get an alpha value on file_1_data but not getting any. Please help. >cat test6.sh awk ' FILENAME==ARGV { file_1_data=$0; print "----- 1 Line " NR " -----" $1; next } FILENAME==ARGV { file_2_data=$0; print "----- 2... (1 Reply)
Discussion started by: pdtak
1 Replies

3. Shell Programming and Scripting

Reading input files

Okay, so I've looked on here and found some similar things, but not exactly what I am looking for. I am working on creating a script that can back up some files, based on the contents of another file - the configuration file. First file contains the files to back up - we'll call this... (1 Reply)
Discussion started by: pdxwarrior
1 Replies

4. Shell Programming and Scripting

Create Multiple files by reading a input file and changing the contents

Being new to this area .I have been assigned a task which i am unable to do . Can any one please help me . Hi I have requirement where i have input file XYZ_111_999_YYYYMMDD_1.TXT and with header and series of Numbers and Footer. I want to create a mutiple output files with each file having a... (2 Replies)
Discussion started by: bhargavkr
2 Replies

5. Shell Programming and Scripting

Search & Replace in Multiple Files by reading a input file

Hi, I have a folder which contains multiple config.xml files and one input file, Please see the below format. Config Files format looks like :- Code: <application name="SAMPLE-ARCHIVE"> <NVPairs name="Global Variables"> <NameValuePair> ... (0 Replies)
Discussion started by: haiksuresh
0 Replies

6. Shell Programming and Scripting

Help with reading two input files in awk

Hello, I'm trying to write an awk program that reads two files inputs. example, file 1: 0.00017835 0.000176738 0.00018811 0.000189504 0.000188155 0.000180065 0.000178991 0.000178252 0.000182513 file 2: 1.7871769E-05 1.5139576E-16 1.5140196E-16 1.5139874E-16 1.7827407E-04 ... (5 Replies)
Discussion started by: joseamck
5 Replies

7. Shell Programming and Scripting

Script to delete files with an input for directories and an input for path/file

Hello, I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall: I regularly need to delete files from many directories. A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies

8. Shell Programming and Scripting

Search & Replace in Multiple Files by reading a input file

I have a environment property file which contains: Input file: value1 = url1 value2 = url2 value3 = url3 and so on. I need to search all *.xml files under directory for value1 and replace it with url1. Same thing I have to do for all values mentioned in input file. I need script in unix bash... (7 Replies)
Discussion started by: Shamkamde
7 Replies

9. UNIX for Advanced & Expert Users

Appending a files contents to the end of a specific file name in several directories

Here is my dir structure: /tmp/dave/myappend.txt /tmp/dave/dir1/test.txt /tmp/dave/dir2/test.txt /tmp/dave/dir3/test.txt /tmp/dave/dir4/test.txt I want to append the contents of myappend.txt to the end of each file with the name "test.txt" in all dirs in /tmp/dave/ I have tried this:... (2 Replies)
Discussion started by: bigd213
2 Replies

10. Shell Programming and Scripting

Read input files and merge them in given order and write them to input one param or one file

Dear Friends, I am looking for a shell script to merge input files into one file .. here is my idea: 1st paramter would be outfile file (all input files content) read all input files and merge them to input param 1 ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies
IXPC(1) 						      General Commands Manual							   IXPC(1)

NAME
ixpc - ixp client SYNOPSIS
ixpc [-a address] action file ixpc -v DESCRIPTION
Overview ixpc is a client to access a 9P file server from the command line or from shell scripts. It can be used to configure wmii(1). Options -a address Lets you specify the address to which ixpc will establish a connection. If this option is not supplied, and the environment variable IXP_ADDRESS is set, ixpc will use this value as its address. Currently, the address can only be a unix socket file or a tcp socket. The syntax for address is taken (along with many other profound ideas) from the Plan 9 operating system and has the form unix!/path/to/socket for unix socket files, and tcp!hostname!port for tcp sockets. -v Prints version information to stdout, then exits. The syntax of the actions is as follows: write Writes the supplied data from the standard input to file, overwriting any previous data. The data to be written is arbitrary and only gains meaning (and restrictions) when it is interpreted by wmiiwm(1). See EXAMPLES below. xwrite The same as write, but the data is taken from subsequent arguments, rather than the standard input. create Creates file or directory. If the file exists, nothing is done. ls Lists files and directories. read Reads file or directory contents. remove Removes file or directory tree. ENVIRONMENT
IXP_ADDRESS See above. EXAMPLES
ixpc ls / This prints the root directory of the wmii filesystem, if IXP_ADDRESS is set to the address of wmii. For more information about the contents of this filesystem, see wmiiwm(1). ixpc xwrite /ctl quit Write 'quit' to the main control file of the wmii filesystem, effectively leaving wmii. ixpc write /keys < keys.txt Replace the contents of /keys with the contents of keys.txt SEE ALSO
wmii(1) http://www.cs.bell-labs.com/sys/man/5/INDEX.html ixpc-VERSION IXPC(1)
All times are GMT -4. The time now is 01:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy