Vlookup on 2 files - inserting vlookup command on another command
Hello, i am trying to print group name column(etc/group) on script (etc/passwd) since group name is not listed on etc/passwd columns. Im trying to do a vlookup. but i cant figure out how i can insert the vlookup command FNR==NR inside the print out command or the output. I also tried exporting etc/group and etc/passwd on a file but still cant find a way on how to do it.
Last edited by Scrutinizer; 06-01-2019 at 03:32 AM..
Reason: code tags
I would like to merge data from a reference file and a data file to produce a new output file as shown below.
Reference file,data file,output file
a , b 2 , a 0
b , d 4 , b 2
c , , c 0
d , , d 4
e, , e 0 (3 Replies)
hi frnds
i have 2 files. 1st is dddd and 2nd is ssss
==> dddd <==:
1,charit
2,gilhotra
==> ssss <==:
1,sajan
2,doda
3,hello
and i want o/p ...mean join and vlookup both files
sajan,charit (4 Replies)
Hi,
I am new to awk/unix and am trying to put together an awk script to perform an action similar to vlookup between the two csv files.
Here are the contents of the two files:
File 1:
Date,ParentID,Number,Area,Volume,Dimensions
2014-01-01,ABC,247,83430.33,857.84,8110.76... (9 Replies)
Hello experts,
I have large text files that need to be arranged using a function like excel's vlookup. I have been playing with awk command but didn't really come up with a solution. Could anyone please help me out? Below are my datasets and expected output. Any help would be greatly... (8 Replies)
Hello Everybody
I am looking for vlookup like functionality in Linux since two files I have are very big(1000MB each) and its not opening completely in excel.
Here the requirement
file1
11,12,13
16,14,12
28,21,22
22,23,24 file 3
18,16,16
14,12,12
23,22,24
16,11,13 here... (8 Replies)
I need to vlookup and check the server not found.
Source file 1
server1
server2
server3
server4
server5_root
server6_silver
server7
server7-test
server7-temp
Source file 2
server1_bronze (6 Replies)
Hi everyone,
I need to replace values of column 2 array1 with values of column 2 array2 based on a lookup of column 4 value, but only return a value IF the values in column 1 of BOTH array1 and array2 match, otherwise keep original value in column 2 of array1. Both files are tab delimited... (2 Replies)
Hi I just want again to ask for help on what command to use to vlookup f1 group name in "/etc/group" matching f3 of it to "/etc/passwd" f4. I do need to display group name in the output of /etc/passwd without using awk or NR==FNR command. thank you
while
IFS=: read -r f1 f2 f3 f4 f5 f6 f7... (4 Replies)
Hi,
I want to compare same column in two files, if values match then display the column or display "NA".
Ex :
File 1 :
123
abc
xyz
pqr
File 2:
122
aab
fdf
pqr
fff
qqq
rrr (1 Reply)
Discussion started by: hkoshekay
1 Replies
LEARN ABOUT DEBIAN
update-passwd
UPDATE-PASSWD(8) System Manager's Manual UPDATE-PASSWD(8)NAME
update-passwd - safely update /etc/passwd, /etc/shadow and /etc/group
SYNOPSIS
update-passwd [options]
DESCRIPTION
update-passwd handles updates of /etc/passwd, /etc/shadow and /etc/group on running Debian systems. It compares the current files to mas-
ter copies, distributed in the base-passwd package, and updates all entries in the global system range (that is, 0-99).
OPTIONS
update-passwd follows the usual GNU command line syntax, with long options starting with two dashes ('-').
-p, --passwd-master=FILE
Use FILE as the master copy of the passwd database. The default value is /usr/share/base-passwd/passwd.master.
-g, --group-master=FILE
Use FILE as the master copy of the group database. The default value is /usr/share/base-passwd/group.master.
-P, --passwd=FILE
Use FILE as the system passwd database. The default value is /etc/passwd.
-S, --shadow=FILE
Use FILE as the system shadow database. The default value is /etc/shadow.
-G, --group=FILE
Use FILE as the system group database. The default value is /etc/group.
-s, --sanity-check
Only perform sanity-checks but don't do anything.
-v, --verbose
Give detailed information about what we are doing. A second -v gives additional detail.
-n, --dry-run
Don't do anything but only show what we would do.
-L, --no-locking
Don't attempt to lock the account database. This should only be used for debugging purposes. I repeat: do not do this unless you
are really sure you need this!
-h, --help
Show a summary of how to use update-passwd.
-V, --version
Show the version number
BUGS
At this moment update-passwd does not verify the shadow-file. It should check if the entries in the passwd are also in shadow and vice
versa, and that passwords are not present in both files.
AUTHOR
Wichert Akkerman <wakkerma@debian.org>
This program was written for the Debian project, and is copyright 1999-2002 Wichert Akkerman and copyright 2002, 2003 Colin Watson. It is
distributed under version 2 of the GNU General Public License.
DEBIAN Debian tools UPDATE-PASSWD(8)