ASPL User Guide v 1.00
© 2025 Bassem W. Jamaleddine


H

   Miscellaneous Scripts for Your UNIX System


You ASPL distribution comes with additional scripts for your UNIX system. These scripts are installed in the product ~shared directory:

asplcmd ~shared

None of these scripts is required for the run-time of the ASPL interpreter.

The first section of this appendix shows some scripts that make it easier for you to query and display data when using ASPL.

The second section, shows some ASPL scripts to help you get started using ASPL on your UNIX system with some of its preprogrammed grouping classes. The following appendix, Shortcut Commands, show the usage of these additional scripts.

■ Additional Scripts for Your UNIX System

Once you install ASPL, some additional commands are made available on your UNIX system. The following is a list of some of these commands:

 whichma 
whichma command is a UNIX like which but with some extra features. It is useful to locate files in your PATH, whether they are executable or not. You can alter the PATH (via the environment variable ALTERNATE_EXPANDEDPATH), and search for files using wildecard, with a colorful output for the matching patterns, etc.

 whichexp 
whichexp finds file names with regular expression in a supplied PATH: whichexp PATH EXPRESSION

whichexp /home/bassem/.aspl:/opt/ASPLv1.00/BRIDGE "GG*BAY*feed*"



 pathedtrees 
pathedtrees builds the PATH from the specified directory, and returns it as a UNIX like colon delimited PATH.

echo $(pathedtrees -dir `asplcmd ~gg`)

Here we build a PATH from the ~gg, set it to ALTERNATE_EXPANDEDPATH, then invoke whichma command to match the regular expression:

ALTERNATE_EXPANDEDPATH=$(pathedtrees -dir `asplcmd ~gg`) whichma xX+iR "aspl*Feeder*pm"

whichexp $(pathedtrees -dir `asplcmd ~gg`) "GG*BAY*feed*"



 gpdata3 
gpdata3 is a script to plot data using Gnuplot. It is essentially used to show the results of set operations on GEOmetric data. It is also used to plot data when intersecting datasets representing periodic or oscillating functions.

 npdata 
npdata is a script to plot data using Gnuplot. It is only available if you purchased an earlier version of NeatPlot. You may request to purchase NeatPlot; however, the revised distribution will be available in March 2026.

 hyphcura 
hyphcura is a hyphened command used in some GEOmetric examples. The Hyphened package is already installed within your distribution. Hyphened reduces any computer command to a string of hyphened words. It is based on a programming approach where a computer command is nothing but a plain string consisting of options (words prefixed with a hyphen).

cd `asplcmd ~shared`

hyphcura



 hyphrand 
hyphrand is a hyphened command used to map random numbers into flat textual files.

cd `asplcmd ~shared`

hyphrand

 dint 
dint displays your system interrupts. You can sort by interrupt value, select specific interrupts, prune and transpose the table when viewing the interrupt. dint can iterate with a loop while gathering your system interrupts. You can cache the results in the directory /tmp/cached_sysstats for replay at a later time.

 dcpus 
dcpus displays system stat on a multicore system. The comamd is really useful with system that have dozen to hundreds of core, since you can prune a range of core, and even sort by core. You can iterate with a loop, collect and cache your CPUs stat data for replay at a later time. You can even transpose your view.

 

■ Some ASPL Related Scripts for Your UNIX System



 setaspl 
setaspl script to source the ASPL environment within your shell session. This script can be located in your ASPL shared directory:

ls -l `asplcmd ~shared`/setaspl

In addition, an important reference to this script, is in your HOWTO text file that is written relative to .aspl/ directory after you have completed the installation of your distribution. The HOWTO file contains the command to be used, so you can source this script when setting up your ASPL environment.

 echo123.aspl 
echo123.aspl is used to check ASPL scripting on your system.

echo123.aspl one two three



 randomdice.aspl 
randomdice.aspl simulation of three players throwing dice on a craptable.

randomdice.aspl 900
     simulate 900 throws for the three players



 playchanges.aspl 
playchanges.aspl showing the rate of changes in a sampled random group.
Sample a random group, then iterate a number of times with a delay, resampling the group, and creating a differential group variable.
Play various operations on the group variable to show the intermittent changes. Show the rate of change over time.
To create a random group, interrogate the group five times, with a delay of one second in between each loop:

playchanges.aspl 5 1



 playsim.aspl 
playsim.aspl sampling a random group over time and showing its rate of dissimilarity.

playsim.aspl 5 1



 dispersed.aspl 
dispersed.aspl display files by same name with different contents

dispersed.aspl /tmp/edu1 /tmp/edu2

This script shows the power of ASPL in using shallow matching on the elements intersection of two groups.
Should your files be dispersed in two directories and some have the same name, here is an ASPL script to help you view these files. ASPL globs the contents of two directories and assign them to two groups labeled by two set variables identifiers.
Use the shallow set intersection ticked with the predicate `c~ to display these files by the same name with different contents.

 dispersed 
dispersed a powerful utility to view files and directories on distributed systems

dispersed -view VIEWSPEC -dir /tmp/edu1 -dir vienna:/tmp/edu1

Your files are often dispersed in various directories on your computer systems. Some files may have the same names with different contents, and some others may have different names with same contents. Here is script to provide you with various views to reveal what is going on with your files whether they are on your local machine or distributed on remote machines. The script can also save your groups to a namedspace so you can load it and explore with different views.

 monitordir.aspl 
monitordir.aspl monitors a directory by looping a number of times with a delay of count seconds.
The following command monitor the directory /tmp/junkdir, looping 9 times with a delay of 5 seconds between each loop.

monitordir.aspl /tmp/junkdir 9 5



 envcompare.pl 
envcompare.pl compares the environment across multiple hosts in a cloud.
envcompare.pl [-view SPECS] -host host1 -host host2 .. -host hostN
You can specify specs, to find the intersection, difference, union, similarity, etc.

envcompare.pl -host localhost -host vienna -view iseq,sim



 jarcompare.pl 
jarcompare.pl compares multiple Java JAR archives.
jarcompare.pl jarfile1 jarfile2 ..

 jarcompare.aspl 
jarcompare.aspl compares two Java JAR archives.

jarcompare.aspl /tmp/JMX/2281258-wasjmx.jar /tmp/JMX/2376115-wasjmx.jar



 wavesbeatfinder.pl 
wavesbeatfinder.pl finds the beats of two waves. That is find when two oscillators intersect along their summed areas.

wavesbeatfinder.pl -points 100 -inc 0.01

wavesbeatfinder.pl -points 1000 -inc 0.01



 mutant.aspl 
mutant.aspl plays with DNA alignment to find mutants.
• To show alignment of DNA for man3 variable that is a mutant, using fragment size of five:

mutant.aspl man3 man3@1 5

• To show the DNA alignment of man1 and man3, but neither one is a mutant of the other, using fragment size of three:

mutant.aspl man1 man3 3