~sircmpwn/mrsh

mrsh/test/command.sh -rw-r--r-- 294 bytes View raw
6770e0deDrew DeVault Add configure script and Makefile 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

lla () {
	ls -la
}

alias ll="ls -l"

command -v if
echo "exists if $?"
command -v cd
echo "exits cd $?"
command -v ls
echo "exists ls $?"
command -v ll
echo "exists ll $?"
command -v lla
echo "exists lla $?"
command -v idontexists
if [ $? -ne 0 ]
then
	echo "ok"
else
	echo "ko"
fi