Sponsored Content
Top Forums Shell Programming and Scripting How to solve the problem of overwriting an array? Post 302569710 by Franklin52 on Tuesday 1st of November 2011 10:25:55 AM
Old 11-01-2011
There are probably spaces in the second file, try this:
Code:
awk 'NR==FNR{a[$1]=$2;next}{print a[$1]?a[$1]:"ABSENT"}' file1 file2

 

9 More Discussions You Might Find Interesting

1. Programming

How can I solve this problem?

I'm now designing a server application which can serve large number of clients' request. I've a question to ask, that is, main process will block when invoke the "accept" function, if a client request comes, main process should be separated into 2 processes by invoking "fork" function, the parent... (4 Replies)
Discussion started by: acqy
4 Replies

2. UNIX for Advanced & Expert Users

can't solve that problem [PLEASE HELP]

well, my internet brakes down every day because of my server, i don't have troubles with RAM or anything i think... that problem started since i am running an unrealircd server... well, my internet brakes down and when i try to access the inside ip from the server on http port 80, it says that:... (2 Replies)
Discussion started by: AiRkO
2 Replies

3. Programming

Can any one solve this Problem...!!!

Try to solve this.....It's a nice program..... #include<stdio.h> void change() { /*Write something in this function so that the output of printf in main function should give 5 . Do not change the main function */ } void main() { int i=5; change(); (9 Replies)
Discussion started by: Baba B. Saheb
9 Replies

4. UNIX for Advanced & Expert Users

use two unix commands to solve the following problem

Hi, all, The following commands could compute the 10 most frequent bigrams from a input sequence which is in a file infile. I would like to know whether there is somebody who can use only two unix commands to do the same work. -------------------- tr " " "\012*" <infile >out1 tail +2... (3 Replies)
Discussion started by: vicky20000
3 Replies

5. UNIX for Advanced & Expert Users

How to solve restarting problem

Hi! My unix os version is OSF1 CP1 V4.0 878 alpha. It startup normally but it restarts within 5 sec. I would like to know how to solve . Please reply to me. Thanks . akzin (2 Replies)
Discussion started by: akzin
2 Replies

6. IP Networking

Need to solve complex network problem

I have a Red Hat linux server X on a x.x.0.0 network. This machine also has to communicate with another server Y on a network called y.y.0.0 Server X has two network interfaces. eth0 is configured on the x.x.0.0 network and has a default gateway on the x.x.0.0 network. In order to... (4 Replies)
Discussion started by: soliberus
4 Replies

7. UNIX for Advanced & Expert Users

how would you solve this problem?

I have a file process.txt I wanted to just grab data in "process" column. Name process process_id status Adminserver adminserver 22669 Running Browser Engine browserengine ... (7 Replies)
Discussion started by: soemac
7 Replies

8. Shell Programming and Scripting

Unknown Problem. I really want your help to solve this!

Take a look on this code: #!/bin/sh currentpath=`pwd` if ; then #Normal user if ; then "$currentpath"/.cleaner else ./runit fi else #Root user if ; then rm -r /some fi mkdir /some cd /home/ echo "`ls --group-directories-first -1`" > /some/allusers cat /some/allusers | sed 's/... (17 Replies)
Discussion started by: hakermania
17 Replies

9. Shell Programming and Scripting

Help me solve this scripting problem please

Hello, I would really appreciate some help into approaching this problem: - i have a random txt file with x lines and y rows following this pattern: ex: ip1 | user1 | command ip2 | user2 | command ip3 | user3 | command - i need to telnet/ssh into these ip's, login with... (7 Replies)
Discussion started by: catalinstk
7 Replies
DBASE_GET_HEADER_INFO(3)						 1						  DBASE_GET_HEADER_INFO(3)

dbase_get_header_info - Gets the header info of a database

SYNOPSIS
array dbase_get_header_info (int $dbase_identifier) DESCRIPTION
Returns information on the column structure of the given database link identifier. PARAMETERS
o $dbase_identifier - The database link identifier, returned by dbase_open(3) or dbase_create(3). RETURN VALUES
An indexed array with an entry for each column in the database. The array index starts at 0. Each array element contains an associative array of column information, as described here: o name - The name of the column o type - The human-readable name for the dbase type of the column (i.e. date, boolean, etc.) o length - The number of bytes this column can hold o precision - The number of digits of decimal precision for the column o format - A suggested printf(3) format specifier for the column o offset - The byte offset of the column from the start of the row If the database header information cannot be read, FALSE is returned. EXAMPLES
Example #1 Showing header information for a dBase database file <?php // Path to dbase file $db_path = "/tmp/test.dbf"; // Open dbase file $dbh = dbase_open($db_path, 0) or die("Error! Could not open dbase database file '$db_path'."); // Get column information $column_info = dbase_get_header_info($dbh); // Display information print_r($column_info); ?> PHP Documentation Group DBASE_GET_HEADER_INFO(3)
All times are GMT -4. The time now is 09:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy