Puppy DECTERM

A home for all kinds of Puppy related projects
Post Reply
Message
Author
User avatar
KusaNoKaito
Posts: 99
Joined: Fri 19 Feb 2010, 22:52
Location: Florida
Contact:

Puppy DECTERM

#1 Post by KusaNoKaito »

I recently had the idea to bring the old VMS commands to Puppy Linux and felt like posting about the project.

I started things off with the simple alias command to get it off the ground.

-----

EDIT: 11:44:16 AM 11/05/12 Added a few more aliases.
EDIT: 09:52:20 PM 11/04/12 Very slowly moving along with this. I used the if statement and some functions to make the commands with more than one word work. (I have yet too add them all)

Code: Select all

 

#!/bin/sh

PS1="$ "

echo "+---------------------------------------+"
echo "|OpenVMS commands now work in Linux!    |"
echo "|For SHOW and SET use lowercase letters |"
echo "|Enjoy!                                 |"
echo "+---------------------------------------+"
echo
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
echo

DECERROR()
{
	echo "%DCL-W-IVVERB, unrecognized command verb - check validity and spelling."
}

show()
{
	if [[ $@ == "default" ]]
	then 
		pwd
	elif [[ $@ == "device" ]]
	then
		df
	elif [[ $@ == "logical" ]]
	then
		printenv
	elif [[ $@ == "process" ]]
	then
		ps aux
	elif [[ $@ == "/queue" ]]
	then
		lpq
	elif [[ $@ == "status" ]]
	then
		time
	elif [[ $@ == "time" ]]
	then
		date
	elif [[ $@ == "users" ]]
	then
		whoami
	elif [[ $@ == "system" ]]
	then
		htop
	else 
		DECERROR
	fi
}

alias append='cat'
alias dir='ls'
alias copy='cp'
alias delete='rm'
alias create='>>'
alias edit='nano'
alias cls='reset'
alias stop='kill'
alias print='lpr'
alias mail='defaultemail'
alias backup='tar'
alias dump='od'
alias exchange='dd'

This is a separate files that is linked into the .bashrc.

Code: Select all

. /root/.OpenVMS_CMDSET
This is just that start to the project. I'll soon be adding scripts to give it more of a DECTERM feel.

All contributions are welcome!

Post Reply