Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to take input from two files in a UNIX script? Post 302780467 by Corona688 on Thursday 14th of March 2013 02:25:22 PM
Old 03-14-2013
You are one infraction away from being set read-only for a while, please listen to the messages and warnings we're giving you. Don't double-post, be sure to code-tag your posts, and do NOT pm people with technical questions or to 'hurry them up'. We are not on call.


Code:
while read VAR1 <&5 && read VAR2 <&6
do
db2 -x "select customer_nbr,client_id from policies where customer_nbr='$VAR1' and client_id='$VAR2' with ur " 
done > "/home/epprod/COSMOS_CUSTOME_CLIENTID_Results.txt"

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to find files on a given input date

Hello gurus, I need to write a script to find out all the file that got changed on a specific folder since a given input date (Date to be given as Input) Thanx (1 Reply)
Discussion started by: ar.karan
1 Replies

2. Shell Programming and Scripting

Write a new file from 2 files as input to the script

Hi- I am hoping someone can give me some pointers to get me started. I have a file which contains some dn's .e.g file 1 cn=bob,cn=user,dc=com cn=kev,cn=user,dc=com cn=john,cn=user,dc=com I have a second file e.g. file.template which looks something like :- dn: <dn> objectclass:... (5 Replies)
Discussion started by: sniper57
5 Replies

3. Shell Programming and Scripting

How to get this script work on multiple input files

Hello Gyues! I would like to use awk to perform data extraction from several files. The data files look like this: DWT26R 1 PEP1 CA 1 OH2 SKIPPED: 0 STEP: 1 0.29000E+01 0.55005E-02 0.60012E-03 0.30000E+01 0.11149E+00 0.13603E-01 0.31000E+01 0.39719E+00 0.63013E-01 0.32000E+01... (9 Replies)
Discussion started by: Daniel8472
9 Replies

4. Shell Programming and Scripting

How to Process input files from folder in shell script?

Hi, I want to process all input files available into folder (C:\ShellPrg\InputFile\) Input files are abc.CSV , XYZ.zip (zip of CSV file), PQR.gz (zip of CSV file). I want to check the extension of file, If its .zip/.gz then need to unzip the file as .CSV I want to parse line by line of... (2 Replies)
Discussion started by: Poonamol
2 Replies

5. Shell Programming and Scripting

Perl Script Not Reading Input Files Correctly

This is one of the strangest things that's happening to me. I'm writing a new Perl script that is trying to read a file. The file is originally in .mof format, but I also saved the contents into a .txt file. As a simple test, I wrote this: #!/user/bin/perl -w use strict; ... (3 Replies)
Discussion started by: kooshi
3 Replies

6. 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

7. Shell Programming and Scripting

Help in unix script to join similar lines of input

Hi, I have been thinking of how to script this but i have no clue at all.. Could someone please help me out or give me some idea on this? I would like to group those lines with the same first variable in each line, joining the 2nd variables with commas. Let's say i have the following input. ... (3 Replies)
Discussion started by: rei125
3 Replies

8. Shell Programming and Scripting

Standardization of input source data files using shell script

Hi there, I'm a newbie in unix and am fishing for options related to how raw input data files are handled. The scenario, as I'm sure y'all must be very familiar with, is this : we receive upwards of 50 data files in ASCII format from various source systems - now each file has its own structure... (3 Replies)
Discussion started by: Prat Khos
3 Replies

9. Shell Programming and Scripting

Building a dynamic UNIX menu with input files

Hi! I am looking to build dynamic menu (named: lookup.sh) that reads a pipe delimited file for input. for example, contents of input.txt could be: user1|srv1 user3|srv1 user4|srv1 user2|srv2 I want the menu look like: 1) get password for user1 on srv1 2) get password for user3 on... (7 Replies)
Discussion started by: cpolikowsky
7 Replies
explain_listen_or_die(3)				     Library Functions Manual					  explain_listen_or_die(3)

NAME
explain_listen_or_die - listen for connections on a socket and report errors SYNOPSIS
#include <libexplain/listen.h> void explain_listen_or_die(int fildes, int backlog); DESCRIPTION
The explain_listen_or_die function is used to call the listen(2) system call. On failure an explanation will be printed to stderr, obtained from explain_listen(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: explain_listen_or_die(fildes, backlog); fildes The fildes, exactly as to be passed to the listen(2) system call. backlog The backlog, exactly as to be passed to the listen(2) system call. Returns: This function only returns on success. On failure, prints an explanation and exits. SEE ALSO
listen(2) listen for connections on a socket explain_listen(3) explain listen(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_listen_or_die(3)
All times are GMT -4. The time now is 07:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy