Sponsored Content
Top Forums UNIX for Dummies Questions & Answers awk construct unfamiliar to me Post 302678637 by RudiC on Sunday 29th of July 2012 04:59:28 AM
Old 07-29-2012
Thanks to both of you. I regarded the {...} in front of the 1 to be the <action block> so the lonely 1 fooled me. Adding "; print" to the "action block" would have done the task as well, I see now. "always learning" as agama states!
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with looping construct

Hi all I have tried to search for this, but keep getting a MySQL db connect error, so am posing the question here, and taking a risk of incurring the wrath of the mods with my first post... I have the following test script: #!/bin/bash HTTPD=`/bin/ps -axcu | /usr/bin/grep httpd... (6 Replies)
Discussion started by: mikie
6 Replies

2. Shell Programming and Scripting

ksh construct

Hi Guys, could someone tell me what this ksh construct does typeset -r PROG_PWD=${0%/*} does I understand the -r for readonly but I would very much appreciate a definitive account of what this will set $PROG_PWD to. If I run this at the cmd line it it gets set to /usr/bin but I would... (2 Replies)
Discussion started by: ajcannon
2 Replies

3. UNIX for Advanced & Expert Users

unfamiliar errors

I was checking my error logs today and ran into some errors I have not seen before maybe somebody has run into these before? /etc/cron.quarter-hourly/owusers.sh: Set effective gid to mail(12) failed! /usr/local/mailwatch/check_sendmail_relay.sh: line 8: thanks (1 Reply)
Discussion started by: mcraul
1 Replies

4. Shell Programming and Scripting

if-else construct not working

Hi all, Sorry to ask this easy question but I am stuck. In a scenario i am executing one shell script which contains a if - else construct : if ; then echo $line $line >> successful_build.txt else $line >> failed_services.txt fi explaination : if the... (5 Replies)
Discussion started by: bhaskar_m
5 Replies

5. Shell Programming and Scripting

syntax error in the if construct

Hi can anyone tell me why is this code giving error mode=$1 if ] || ] then echo "MODES:" exit 1 fi Thanks (5 Replies)
Discussion started by: Anteus
5 Replies

6. Shell Programming and Scripting

Unfamiliar array syntax

I recently was handed responsibility for a script which has array references that are new to me and I could use some help understanding them. Parts of the config file and script are included. This script collects backups from a jail server of the jails running on that host. Several jail... (1 Reply)
Discussion started by: thumper
1 Replies

7. Shell Programming and Scripting

Help with if-else construct

Hi all i have been trying to do a small 'question and answer' script using if-else statement and a combination of pipe. I have succeeded in allowing the user to login with user name and password stored in a sequence username/password in a file named "pass" like this: echo "please enter your... (14 Replies)
Discussion started by: arikutex
14 Replies

8. Shell Programming and Scripting

Construct path

Hi, I need to construct the below path from the two available directory path, O/P /home/data/test/run/ht/WEB/HTML /home/data/test/run/ht/WEB/JSP /home/data/test/run/ht/WEB/CSS Path:1 ------ /home/data/test/run/ Path:2 ------ /home/data/share/app/01/lang/ht/WEB/HTML... (5 Replies)
Discussion started by: vel4ever
5 Replies

9. Shell Programming and Scripting

How would I construct a (possibly simple) IF statement?

Hi all, I thought this would be simple, but I've been having a lot of trouble trying to write this IF statement, if I may ask for help pls: In BASH, how would I construct the if statement: Should ONLY be true if USEROPTscript=="yes"]] AND $mode=="INSTALL" /or/ $mode=="CHANGE" ]]... (3 Replies)
Discussion started by: jmccoughlin
3 Replies
rctladm(1M)                                                                                                                            rctladm(1M)

NAME
rctladm - display or modify global state of system resource controls SYNOPSIS
rctladm [-lu] [-e action] [-d action] [name...] The rctladm command allows the examination and modification of active resource controls on the running system. An instance of a resource control is referred to as an rctl. See setrctl(2) for a description of an rctl; see resource_controls(5) for a list of the rctls supported in the current release of the Solaris operating system. Logging of rctl violations can be activated or deactivated system-wide and active rctls (and their state) can be listed. The following options are supported: -d action Disable (-d) or enable (-e) the global action on the specified rctls. If no rctl is specified, no action is taken and an -e action error status is returned. You can use the special token all with the disable option to deactivate all global actions on a resource control. You can set the syslog action to a specific degree by assigning a severity level. To do this, specify syslog=level, where level is one of the string tokens given as valid severity levels in syslog(3C). You can omit the common LOG_ prefix on the severity level. -l List available rctls with event status. This option displays the global event actions available for each rctl and the action name used with the enable (-e) and disable (-d) options. The global flag values for the control are also displayed. If one or more name operands are specified, only those rctls matching the given names is displayed. This is the default action if no options are specified. -u Configure resource controls based on the contents of /etc/rctladm.conf. Any name operands are ignored. The following operands are supported: name The name of the rctl to operate on. Multiple rctl names may be specified. If no names are specified, and the list action has been specified, then all rctls are listed. If the enable or disable action is specified, one or more rctl names must be specified. Example 1: Activating System Logging for Specific Violations The following command activates system logging of all violations of task.max-lwps. # rctladm -e syslog task.max-lwps # Example 2: Examining the Current Status of a Specific Resource The following command examines the current status of the task.max-lwps resource. $ rctladm -l task.max-lwps task.max-lwps syslog=DEBUG $ The following exit values are returned: 0 Successful completion. 1 A fatal error occurred. A message is written to standard error to indicate each resource control for which the operation failed. The operation was successful for any other resource controls specified as operands. 2 Invalid command line options were specified. /etc/rctladm.conf Each time rctladm is executed, it updates the contents of rctladm.conf with the current configuration. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ setrctl(2), getrctl(2), prctl(1), rctlblk_get_global_flags(3C), rctlblk_get_global_action(3C), attributes(5), resource_controls(5) By default, there is no global logging of rctl violations. 1 Oct 2004 rctladm(1M)
All times are GMT -4. The time now is 01:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy