hi,
can someone help please -
lsuser returns -
lsgroup -c -a id ALL
#name:id
system:0
#name:id
staff:1
#name:id
bin:2
#name:id
sys:3
i want the hostname:field1:field2 without the comments but my awk is not working !!
thanks in advance !!
can someone help please -
lsuser returns -
lsgroup -c -a id ALL
#name:id
system:0
#name:id
staff:1
#name:id
bin:2
#name:id
sys:3
i want the hostname:field1:field2 without the comments but my awk is not working !!
Code:
lsgroup -c -a id ALL | awk -F: '$1 !~ /^#/ {print '`hostname`':$1:$2}'
syntax error The source line is 1.
The error context is
$1 !~ /^#/ {print >>> server1: <<<
awk: The statement cannot be correctly parsed.
The source line is 1.
thanks in advance !!