Tag Archives: ksh

Variable sizes in KSH

It looks like the POSIX shell doesn’t support variable sizes greater than 2 Gigabytes. In the following example, the LIMIT variable is of 1 Gbyte, and the VALUE is 4 GBytes. # LIMIT=1073741824 # VALUE=4294967296 # if [ $LIMIT -lt $VALUE ] > then > echo “exceeds limit” > else > echo “passed” > fi [...]

UNIX95 variable influences to the ps command

Setting UNIX95 to some value (it doesn’t matter what it is) changes the behavior of the ps command to use the XPG4 environment instead of the HPUX environment. You can see all the different command line options and the XPG4 behaviors by looking at the man pages (e.g. man ps). Several options like ps -o [...]

Advanced scripting – changing the UID of a user

At one of our customer we will have an monstre’ UID-consolidation projekt in the near future. For this purpose I’ve written a script to enlighten our task. Most of you thinks at it a an over-complicated (usermod && find …. chown …) job, but my script has undergone some performance optimisation too: it starts parallel [...]

Sticky revealed – difference between rws and rwS

This will be a short one. I just wanted to make myself a short reminder about Unix permissions. The theory about SUID/SGID/Sticky bits are already clear. But there is a slight difference between SUID and SUID (sic!): # ll test -rwxr-xr-x 1 root root 0 Jul 20 16:56 test # chmod u+s test # ll [...]

Differences between shells

Here is a comparison matrix I’ve found on www.faqs.org: sh csh ksh bash tcsh zsh rc es Job control N Y Y Y Y Y N N Aliases N Y Y Y Y Y N N Shell functions Y(1) N Y Y N Y Y Y “Sensible” Input/Output redirection Y N Y Y N Y [...]