i=0
while [ $i -le $CRT ]
do
i=$[i+1]
awk '/^Listen/{print $1 " ""\$LISTEN_PORT$i"}' httpd.conf
done
But I get
awk: cmd. line:1: warning: escape sequence `\$' treated as plain `$'
Listen $LISTEN_PORT$i
Listen $LISTEN_PORT$i
Listen $LISTEN_PORT$i
Listen $LISTEN_PORT$i
Listen $LISTEN_PORT$i
And the values to be written in httpd.conf. Should SED be used in this case ?
And I come again with the question on why the variable value is lost when exiting this while:
j=0
grep "^Listen" httpd.conf | awk '{print $2}'|
while read var
do
eval "LPORT"$j=$var
eval echo "\$LPORT$j"
j=$[j+1]
done
echo $LPORT1
In the following code, Im trying to imbed many statements in a single awk statement. But it gives an error on that,
for i in `less usage_types_dwh.txt`
do
cd /u01/app/evident/analysis_lab/usg_type
grep $i svc_type.txt | head -1 | awk 'BEGIN {FS=","} {print $1 "==" $2 ":" $3 ":" $4;... (2 Replies)
I have this input file
0FB7,1083,Synchronized,FriNov121655,2816_7RAID5,05F:1_10F:1,10000000NoneNone,DC_db00p01
0FB7,1150,Split,MonApr180658,2816_7R5GC,N/A,N/A,N/A
06C4,0710,Synchronized,WedMar91105,2816_7RAID5,04E:1_11E:1,10000000NoneNone,DL_nb00p25... (1 Reply)
Hi guys,
i am trying to analyze a text file using awk and am not able to solve this issue.
This is the piece of code that I have written
BEGIN {
## Time to count MACs -> 5 seconds.
TIME_LIMIT = 5;
k = 50000;
}
## For every line.
{
time_in_seconds = $1... (2 Replies)
Hi Gurus,
I am facing a similar issue usiung an awk command. Below is my requirement:
---DATA---
A;F;G
A;D;E
A;D;E
B;Z;P
C;Z;Q
Expected:
A
F<TAB>G
D<TAB>E
D<TAB>E
B
D<TAB>E (1 Reply)
Hi all,
i am trying to use below command to see the output of hardware inventory, but i only see 2 first line no output of the command.
awk '/Hardware/ {print $0}' XXX_result.txt
Hardware inventory:
Hardware inventory:
any idea how to see whatever is under hardware inventory.
i... (11 Replies)
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
On AIX 5.3 and AIX 6.1, I have this script for checking printers being pingable or not.
for i in `lsallq`
do
echo "Queue Name: " $i
echo "----------------------------------------"
for j in `lsallqdev -q $i`
do
echo " Device Name:" $j
hname=`echo... (3 Replies)
OK, so I am trying to use awk as a method of accessing a table stored in a file to then provide the capability of a look up table.
The table is stored in a file named "/Users/jhaney/Desktop/assetTypeMapping.tsv" and looks like this:
aCategory aLetter aNumber
AssetCat1 A 123 ... (10 Replies)
Discussion started by: jhaneyzz
10 Replies
LEARN ABOUT DEBIAN
cupsctl
cupsctl(8) Apple Inc. cupsctl(8)NAME
cupsctl - configure cupsd.conf options
SYNOPSIS
cupsctl [ -E ] [-U username ] [ -h server[:port] ] [ --[no-]debug-logging ] [ --[no-]remote-admin ] [ --[no-]remote-any ] [ --[no-]remote-
printers ] [ --[no-]share-printers ] [ --[no-]user-cancel-any ] [ name=value ]
DESCRIPTION
cupsctl updates or queries the cupsd.conf file for a server. When no changes are requested, the current configuration values are written to
the standard output in the format "name=value", one per line.
OPTIONS
The following options are recognized:
-E
Enables encryption on the connection to the scheduler.
-U username
Specifies an alternate username to use when authenticating with the scheduler.
-h server[:port]
Specifies the server address.
--[no-]debug-logging
Enables or disables debug logging in the error_log file.
--[no-]remote-admin
Enables or disables remote administration.
--[no-]remote-any
Enables or disables printing from any address, e.g. the Internet.
--[no-]remote-printers
Enables or disables the display of remote printers shared via the CUPS, LDAP, or SLP protocols.
--[no-]share-printers
Enables or disables sharing of local printers with other computers.
--[no-]user-cancel-any
Allows or prevents users from canceling jobs owned by others.
EXAMPLES
Display the current settings:
cupsctl
Enable debug logging:
cupsctl --debug-logging
Get the current debug logging state:
cupsctl | grep '^_debug_logging' | awk -F= '{print $2}'
Disable printer sharing:
cupsctl --no-shared-printers
KNOWN ISSUES
You cannot set the Listen or Port directives using cupsctl.
SEE ALSO cupsd.conf(5), cupsd(8),
http://localhost:631/help
COPYRIGHT
Copyright 2007-2011 by Apple Inc.
12 December 2012 CUPS cupsctl(8)