© 2023 PodTECH IO
All rights reserved.

Get in Touch

MYSQL

Select next available ID

Select next available ID ## Select the next available UID ## Do not delete users from unixuid and unix gid as there id’s may get re-used ######################################## [sql] SELECT min( r1.uid ) +1 AS next_available_uid FROM unixuid AS r1 LEFT OUTER JOIN unixuid AS r2 ON r2.uid = r1.uid +1 WHERE r1.uid >200 AND r2.uid […]

UNIX

Shell, KSH Read Variables

Shell, KSH Read Variables Read in a Variable From a user we read with: read var. Then the users can type something in. One should first print something like: [bash] print -n “Enter your favorite haircolor: “; read var; print “”. [/bash] The -n suppresses the newline sign. Read into a File Line for Line […]

Perl

Pass Parameters to Perl Script

Pass Parameters to Perl Script Perl command line arguments stored in the special array called @ARGV. ARGV example Use $ARGV[n] to display argument. Use $#ARGV to get total number of passed argument to a perl script. For example, if your scriptname is foo.pl and you called script as follows: ./foo.pl one two three You can […]