Here is an awk line I have in a bigger script that checks to see if nimsh process is running and does couple other things based on the output and runs on all servers.
I find that on some servers because of discrepancy in the 5th field(may in some servers and timestamp in others) , my nimsh becomes 8th or 9th field.
How can i write a statement so that it yields /usr/sbin/nimsh on all servers?
server A:
server B:
Moderator's Comments:
Please use code tags for your samples as per forum rules.
Last edited by RavinderSingh13; 06-21-2019 at 02:11 PM..
Hi,
I'm a total beginner at awk and hope someone can advise what I have done wrong in the following script:
I have a file which (to simplify things) may be something like this
Fred Smith and Sue Brown
Joe Jones and Jane Watts
Sally Green and Jim O?
Connor
Freda O?
Reiley and Pat O?... (2 Replies)
Trying to write an if statement, which calls2 or 3 functions from within it.
code:
{if (($34 != "") && (NR != 1) && ($1 != "F"))
less_than(34, 0, "S1002a")
is_number(34,"S1002a")
}
But this is only treating the first function call, as part of the if.
and always executes is_number.... (1 Reply)
Hello,
I'm trying to use awk to print lines that match a regular expression.
I am using awk to print a record only if it contains N/A.
awk '/N/A/ {print $1}'
When executed the script returns "awk syntax error near line 1".
If I use /N//A/ it prints all records containing a "/", not... (2 Replies)
Hi ,
I have a simple question in awk, i have long string which i am getting for a grep command. the output contains 50 fields.
I need to display like first 5 fileds in a line and rest of all fields in the next line.
{ for(i=5;i<NF;++i) s= $i; print $1,$2,$3,$4,$5,"\n",$s}
Is the above... (1 Reply)
I have a file
CREATE TABLE DDD_EXT --- 1000
(
val u1
val u1
);
CREATE TABLE dsdasd_EXT --- 1323
(
val u1
val u1
);
CREATE TABLE AAAAAA_EXT --- 1222
(
val u1
val u1
);
CREATE TABLE E_EXT --- 11
(
val u1
val u1 (2 Replies)
Hi,
Probably a very weak question.. but I have tried all I know..
BPC0001:ANNUL_49542 0.0108 -0.0226 -0.0236 0.0042 0.0033 -0.0545 0.0376 0.0097 -0.0093 -0.032 Control
BPC0002:ANNUL_49606 0.0190 -0.0142 -0.0060 -0.0217 -0.0027 ... (3 Replies)
Hi,
let's assume i have an output below:
orgauser 23826 :E:Validity
senerse 2096
senerse 2111
senerse 21585
senerse 21596
root 12653 -bash
root 17262
root 17278
Some lines have not any string in their third column. I don't want to see those lines. i just want to see the lines... (3 Replies)
Can anyone tell me please what the "+" is doing in this awk command?
find / -user smith -type f -ls | awk '{ sum += $7 } END {print sum }'
Thanks,
George (2 Replies)
Hi All,
A very silly question:
How to just print the integer attached a particular string in a line by awk?
Ex:
Happy_world_foo123...So i just want the value 123 to be printed on the line where we have string "foo".
Thanks (16 Replies)
I have what a think is a simple question but I'm just a beginner in scripting. I'm my unix command line I run a date command that returns the following:
Wed Apr 3 10:39:30 EDT 2013
How do I awk out the "10" only in awk? Or is awk the way to do it or is there a better way? (7 Replies)
Discussion started by: scj2012
7 Replies
LEARN ABOUT OSF1
ypsetup
nissetup(8) System Manager's Manual nissetup(8)NAME
nissetup, ypsetup - Sets up the Network Information Service (NIS) environment
SYNOPSIS
/usr/sbin/nissetup
/usr/sbin/ypsetup
DESCRIPTION
The nissetup (formerly ypsetup) script configures and runs NIS on your system. You can use nissetup to initially set up your NIS configura-
tion, to change your current NIS configuration, or to remove your NIS configuration. NIS provides a distributed data lookup service for
sharing data among networked systems.
Before running nissetup, make sure that your system is connected to a local area network and that the network is configured and running.
You must know the name of your NIS domain and your system's role in the domain (master server, slave server, or client).
Security Note
You invoke nissetup from the SysMan Menu. See sysman(8) for more information.
When using the nissetup script to set up a NIS server that is running with enhanced security, you must answer yes to the question about
locking the domain name and authorized servers (the ypbind -S option). If you are setting up a master server, the server is bound to itself
(done by default). If you are setting up a slave server, the server is bound to itself done by default) and optionally to the master server
and any other slave servers.
If your system will be the master server for your NIS domain, be sure no other master exists for your domain and that the NIS database
files are in the /var/yp/src directory.
Note
Remove the root entry, if it exists, from the passwd database file.
If your system be will be a slave server or client, be sure a master server is already set up for your NIS domain.
FILES
Specifies the command pathname NIS parameters pertinent to a specific system
Default NIS Databases
In the /var/yp/src directory, the default databases are: Group database Host database Sendmail alias database Network group aliases data-
base Network database Password database Protocol database RPC database Service database
SEE ALSO
Commands: domainname(1), ypwhich(1), svcsetup(8), sysman(8), sysman_station(8), ypbind(8), yppasswdd(8), ypserv(8), ypxfr(8)
Files: svc.conf(4)
Networking: nis_intro(7), nis_manual_setup(7)
Network Administration
nissetup(8)