Hi, the default ORS (output record separator) is set to '\n' . If it were left to its default value, then the output of each print command would appear on a different line, whereas the intention appears to be to print al fields on the same line, but in reverse order, separated by two spaces.
--
The creator of the script could have accomplished the same using printf, which is more intended for this purpose and then ORS would not need to be set:
Last edited by Scrutinizer; 01-20-2019 at 03:20 AM..
Reason: Added empty string to the print command
This User Gave Thanks to Scrutinizer For This Post:
:D dear members I have a good knowledge of gawk and seem to do quite well with it.. but I have never understood what the use of the rs and ors are for or how they are used.. i am thinking they are for seperating lines and paragraphs but i have absolutely no idea how to make it work, if that is what... (2 Replies)
Hi ,
Can anyone explains what does the below highlighted statements means:
# Set environment variables
. ${0%/*}/wrkenv.sh
jobName_sh=${0##*/}
jobName=${jobName_sh%.*}
Thanks,
Sri (1 Reply)
Hi,
Pls explain me what the below code is doing. specially meaning if -a while calling test function-
case $1 in
1) beg_dt=01; end_dt=07 ;;
2) beg_dt=08; end_dt=14 ;;
3) beg_dt=15; end_dt=21 ;;
4) beg_dt=22; end_dt=28 ;;
5) beg_dt=29; end_dt=31 ;;
esac test \( `date +%w` -eq $2 -a... (3 Replies)
Hi,
I'm working on INFORMIX4GL, i'm just trying to find out the missing indexes in my db.
I think SET EXPLAIN ON would give me some hint on this
Do anyone know how to use this?
Thanks (1 Reply)
Hi Guys,
Please help me, I am new to programming and I don’t understand what some parts of this code are doing. I have comments on the parts I know, please help if my understanding of the code is not correct and also help with parts with questions.
awk '
{
gsub( ">",... (1 Reply)
Hello,
I am trying to filter fastq file (in short, every 4 lines to be a record) based on the GC counts (GC-contents) in sequence (i.e. field 2), which is the count % of the G/C chars in the string. The example script is to pick up records with GC contents > 0.6 in the sequence (second field). ... (9 Replies)
Hello Team,
here is the code:
scripts]# ls /etc/init.d/ | awk 'BEGIN{ORS=" && "} /was.init/ && !/interdependentwas/ && !/NodeAgent/ && !/dmgr/{print "\$\{service_cmd\} "$0 " status"}' 2>/dev/null
${service_cmd} cmserver_was.init status && ${service_cmd} fmserver_was.init status &&... (6 Replies)
Discussion started by: chandana.hs
6 Replies
LEARN ABOUT HPUX
sccshelp
sccshelp(1) General Commands Manual sccshelp(1)NAME
sccshelp - ask for help on SCCS commands
SYNOPSIS
[arg]...
DESCRIPTION
The command finds information to explain a message from an SCCS command or to explain the use of a SCCS command. Zero or more arguments
can be supplied. If no arguments are given, prompts for one:
The arguments can be either message numbers (which normally appear in parentheses following messages) or command names, of one of the fol-
lowing types:
Type 1 Begins with nonnumerics, ends in numerics. The nonnumeric prefix is usually an abbreviation for the program or set of
routines which produced the message (e.g., for message 6 from the command).
Type 2 Does not contain numerics (as a command, such as
Type 3 Is all numeric (e.g.,
The response of the program is the explanatory information related to the argument, if there is any.
You can use to support other commands by means of the file. To do this, create help files in the appropriate format and add the location
of the helpfiles to
EXTERNAL INFLUENCES
Environment Variables
determines the interpretation of text as single- and/or multibyte characters.
determines the language in which messages are displayed.
If is not specified or is null, it defaults to the value of If is not specified or is null, it defaults to "C" (see lang(5)). If any
internationalization variable contains an invalid setting, all internationalization variables default to "C". See environ(5).
International Code Set Support
Single- and multibyte character code sets are supported.
DIAGNOSTICS
When all else fails, try
EXAMPLES
If you enter the SCCS command without parameters, you would get the message:
If you request help for the command:
it displays:
If you request help for the error number:
it displays:
WARNINGS
Only SCCS commands currently use
FILES
Directory containing files of message text
List of commands supported by sccshelp
File containing the locations of help files that are not in the
directory
sccshelp(1)