Sponsored Content
Top Forums Shell Programming and Scripting difference between "QUIET=${QUIET:-yes}" and "QUIET=yes" Post 302370258 by kinny on Wednesday 11th of November 2009 01:42:35 AM
Old 11-11-2009
If the QUIET variable is not set it will be default to yes in the first case

QUIET variable will be set to YES in the second case
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

3. Solaris

difference between "root" and "usr" packages

Hi, could someone pls enlighten me on the difference between the "root" package and "usr" package? Like in this example: pkginfo -l SUNWGtku | grep -i desc DESC: GTK - The GIMP Toolkit (Usr) and pkginfo -l SUNWGtkr | grep -i desc DESC: GTK - The GIMP Toolkit (Root)... (6 Replies)
Discussion started by: masloff
6 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Solaris

The slices "usr", "opt", "tmp" disappeared!!! Help please.

The system don't boot. on the screen appears following: press enter to maintenance (or type CTRL-D to continue)...I checked with format command. ... the slices "0-root","1-swap","2-backup" exist. ...the slises "3-var","6-usr" -unassigned. :( (16 Replies)
Discussion started by: wolfgang
16 Replies

6. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

7. Red Hat

"rhgb quiet" controlling the display of commands in single user mode ?"rhgb quiet" controlling the d

Why does removing "rhgb quiet" from the kernel boot parameters control whether or not the commands I enter are displayed in single user mode ? For instance, if I do not remove "rhgb quiet", when I am in single user mode, whatever command I type will not be displayed on the screen. The... (0 Replies)
Discussion started by: Hijanoqu
0 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

9. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
KENV(2) 						      BSD System Calls Manual							   KENV(2)

NAME
kenv -- kernel environment LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <kenv.h> int kenv(int action, const char *name, char *value, int len); DESCRIPTION
The kenv() system call manipulates kernel environment variables. It supports the well known userland actions of getting, setting and unset- ting environment variables, as well as the ability to dump all of the entries in the kernel environment. The action argument can be one of the following: KENV_GET Returns the value associated with the named kernel environment variable. If the variable is not found, -1 is returned and the global variable errno is set to ENOENT. Only the number of bytes available in value are copied out. KENV_SET Sets or adds a new kernel environment variable. This option is only available to the superuser. KENV_UNSET Unsets the kernel environment variable name. If the variable does not exist, -1 is returned and the global variable errno is set to EINVAL. This option is only available to the superuser. KENV_DUMP Dumps as much of the kernel environment as will fit in value. If value is NULL, kenv() will return the number of bytes required to copy out the entire environment. The name argument is the name of the environment variable to be affected. In the case of KENV_DUMP it is ignored. The value argument contains either the value to set the environment variable name to in the case of KENV_SET, or it points to the location where kenv() should copy return data to in the case of KENV_DUMP and KENV_GET. If value is NULL in the case of KENV_DUMP, kenv() will return the number of bytes required to copy out the entire environment. The len argument indicates how many bytes of storage value points to. RETURN VALUES
The kenv() system call returns 0 if successful in the case of KENV_SET and KENV_UNSET, and the number of bytes copied into value in the case of KENV_DUMP and KENV_GET. If an error occurs, a value of -1 is returned and the global variable errno is set to indicate the error. ERRORS
The kenv() system call will fail if: [EINVAL] The action argument is not a valid option, or the length of the value is less than 1 for a KENV_SET. [ENOENT] no value could be found for name for a KENV_SET or KENV_UNSET. [EPERM] a user other than the superuser attempted to set or unset a kernel environment variable. [EFAULT] bad address was encountered while attempting to copy in user arguments, or copy out value(s). [ENAMETOOLONG] the name of a variable supplied by the user is longer than KENV_MNAMELEN or the value of a variable is longer than KENV_MVALLEN. SEE ALSO
kenv(1) AUTHORS
This manual page was written by Chad David <davidc@FreeBSD.org>. The kenv() system call was written by Maxime Henrion <mux@FreeBSD.org>. BSD
April 17, 2002 BSD
All times are GMT -4. The time now is 12:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy