tektipsaix
Technical User
Hi all
I want to add a server description to some output. The command should look this up in another file.
$1 is the server_name, and $3 will be the description.
serverlist.txt has 2 columns: server_name and server_location
serverdesc.txt has 2 columns: server_name and server_description
$3 must be looked up from the serverdesc.txt file. How can this be accomplished ?
syntax:
cat serverlist.txt | awk '{ printf("%- 20s %- 20s %- 10s\n", $1, $2, $3); }'
Many thanks!
Jasper
I want to add a server description to some output. The command should look this up in another file.
$1 is the server_name, and $3 will be the description.
serverlist.txt has 2 columns: server_name and server_location
serverdesc.txt has 2 columns: server_name and server_description
$3 must be looked up from the serverdesc.txt file. How can this be accomplished ?
syntax:
cat serverlist.txt | awk '{ printf("%- 20s %- 20s %- 10s\n", $1, $2, $3); }'
Many thanks!
Jasper