Some shells (such as bash and 1993 or later versions of ksh) provide:
but this is an extension that is not yet specified by the standards. As you said, standard ways to do the same thing require an initialization step before the loop, such as in:
and in:
Note: As noted by Scrutinizer in post #8, the POSIX standards do not require $((++n)) to work. (It works with a recent bash and with a 1993 or later version of ksh, but is an extension to the requirements specified by the standards.)
should work in an POSIX-conforming shell.
Last edited by Don Cragun; 07-10-2016 at 04:56 PM..
Reason: Add note.
This User Gave Thanks to Don Cragun For This Post:
Hello,
I am trying to convince my boss to stop allowing our users to login as root (superuser). Currently our users login to our unix server with their own account, then as needed, they will do an su and put in the root password.
This scares me, for a bunch of reasons. Mainly, one is that we... (1 Reply)
In different online sources, I found bits and pieces of information about those square and angular brackets and pipes. From what I have read, I can conclude it looks like this:
1. Options outside any brackets are mandatory
2. Options inside these < .. > are mandatory too
3. Options inside ... (4 Replies)
From the nessus scanner tool report i got below vulnerability
PCI DSS Compliance : Insecure Communication Has Been Detected
http://www.tenable.com/plugins/index.php?view=single&id=56208
As per the description given in above link - I am not able to understand
How to find insecure port... (2 Replies)
Hi i am in new to Linux world . I have been assigned to a project to find out a tool that will fulfill the PCI compliance for Linux servers for Audit process. anyone have any recommendation on that. Do Rad hat have any native application or plug-ins which we can use for that. (1 Reply)
I need to set password compliance for some servers in my company.
However, the requirements are that we need to set different password policies for 3 different user groups within the company. These are :
System Users: i.e root, etc
Batch/Application Users: oracle, bscs, etc
Standard User:... (0 Replies)