© 2023 PodTECH IO
All rights reserved.

Get in Touch


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 […]


change passwd – permission denied (NIS)

Change passwd – permission denied (NIS) I setup a new NIS server and put the NIS source files in /var/yp/src/ The command line “passwd” gave me a permission denied when changing an NIS user’s password. A restart of yp fixed the problem for me.. Eventually I restarted NIS with: [bash] /usr/lib/netsvc/yp/ypstop /usr/lib/netsvc/yp/ypstart [/bash]


Perl Split

Perl Split A very useful function in Perl is split, which splits up a string and places it into an array. The function uses a regular expression and as usual works on the $_ variable unless otherwise specified. The split function is used like this: [perl] $info = “Caine:Michael:Actor:14, Leafy Drive”; @personal = split(/:/, $info); […]


Perl Hashes – HowTo

Perl Hash Howto This how-to comes with no guaratees other than the fact that these code segments were copy/pasted from code that I wrote and ran successfully. Initialize (clear, or empty) a hash Assigning an empty list is the fastest method. Solution my %hash = (); Initialize (clear, or empty) a hash reference People have […]


SCCS Commands

SCCS Commands sccs Subcommands Checking Files In and Out The following subcommands are useful when retrieving versions or checking in changes. Checking Out a File for Editing: sccs edit 1 To edit a source file, you must check it out first using sccs edit. SCCS responds with the delta ID of the version just retrieved, […]

Security UNIX

Setting up SSH public/private keys

Setting up SSH public/private keys SSH (Secure Shell) can be set up with public/private key pairs so that you don’t have to type the password each time. Because SSH is the transport for other services such as SCP (secure copy), SFTP (secure file transfer), and other services (CVS, etc), this can be very convenient and […]


Checking Memory on UNIX

Checking Memory on UNIX [bash]ps -A –sort -rss -o comm,pmem | head -n 11[/bash] [bash]ps -auxf | sort -nr -k 4 | head -10[/bash] [bash]free[/bash] [bash]free -m[/bash] [bash]ps aux | awk ‚Äò{sum +=$4}; END {print sum}‚Äô[/bash]