Linux web0273.sh.tyo1 4.18.0-553.141.2.lve.el7h.x86_64 #1 SMP Wed Jul 8 17:20:31 UTC 2026 x86_64
Apache
: 127.0.0.1 | : 216.73.216.251
Cant Read [ /etc/named.conf ]
8.3.31
r2745769
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
bin /
[ HOME SHELL ]
Name
Size
Permission
Action
GET
14.71
KB
-rwxr-xr-x
[
40.52
KB
-rwxr-xr-x
a2p
105.32
KB
-rwxr-xr-x
aclocal
35.87
KB
-rwxr-xr-x
aclocal-1.13
35.87
KB
-rwxr-xr-x
addr2line
28.42
KB
-rwxr-xr-x
agentxtrap
19.16
KB
-rwxr-xr-x
animate
7.04
KB
-rwxr-xr-x
ar
61.21
KB
-rwxr-xr-x
arch
32.3
KB
-rwxr-xr-x
as
377.37
KB
-rwxr-xr-x
aspell
163.35
KB
-rwxr-xr-x
at
1.01
KB
-rwxr-xr-x
atq
1.01
KB
-rwxr-xr-x
atrm
1.02
KB
-rwxr-xr-x
autoconf
14.42
KB
-rwxr-xr-x
autoheader
8.33
KB
-rwxr-xr-x
autom4te
31.43
KB
-rwxr-xr-x
automake
246.44
KB
-rwxr-xr-x
automake-1.13
246.44
KB
-rwxr-xr-x
autoreconf
20.57
KB
-rwxr-xr-x
autoscan
16.72
KB
-rwxr-xr-x
autoupdate
33.08
KB
-rwxr-xr-x
awk
418.54
KB
-rwxr-xr-x
base64
36.48
KB
-rwxr-xr-x
basename
28.35
KB
-rwxr-xr-x
bash
941.93
KB
-rwxr-xr-x
bashbug-64
6.8
KB
-rwxr-xr-x
batch
137
B
-rwxr-xr-x
bison
393.34
KB
-rwxr-xr-x
bunzip2
31.89
KB
-rwxr-xr-x
byacc
84.48
KB
-rwxr-xr-x
bzcat
31.89
KB
-rwxr-xr-x
bzcmp
2.08
KB
-rwxr-xr-x
bzdiff
2.08
KB
-rwxr-xr-x
bzgrep
1.64
KB
-rwxr-xr-x
bzip2
31.89
KB
-rwxr-xr-x
bzip2recover
15.24
KB
-rwxr-xr-x
bzless
1.23
KB
-rwxr-xr-x
bzmore
1.23
KB
-rwxr-xr-x
c++
754.58
KB
-rwxr-xr-x
c++filt
27.91
KB
-rwxr-xr-x
c2ph
35.75
KB
-rwxr-xr-x
c89
224
B
-rwxr-xr-x
c99
215
B
-rwxr-xr-x
cagefs_enter.proxied
1.03
KB
-rwxr-xr-x
cal
36.8
KB
-rwxr-xr-x
captoinfo
64.26
KB
-rwxr-xr-x
cat
52.81
KB
-rwxr-xr-x
catchsegv
3.26
KB
-rwxr-xr-x
cc
750.58
KB
-rwxr-xr-x
chcon
61.46
KB
-rwxr-xr-x
chgrp
61.32
KB
-rwxr-xr-x
chmod
57.22
KB
-rwxr-xr-x
chown
61.36
KB
-rwxr-xr-x
chrt
32.17
KB
-rwxr-xr-x
cksum
32.38
KB
-rwxr-xr-x
cldetect
10.35
KB
-rwxr-xr-x
clear
7.02
KB
-rwxr-xr-x
clusterdb
53.2
KB
-rwxr-xr-x
cmp
44.21
KB
-rwxr-xr-x
col
23.88
KB
-rwxr-xr-x
colcrt
11.29
KB
-rwxr-xr-x
colrm
23.77
KB
-rwxr-xr-x
column
27.99
KB
-rwxr-xr-x
combinediff
48.7
KB
-rwxr-xr-x
comm
36.55
KB
-rwxr-xr-x
compare
11.09
KB
-rwxr-xr-x
composite
7.04
KB
-rwxr-xr-x
conjure
7.04
KB
-rwxr-xr-x
convert
7.04
KB
-rwxr-xr-x
cp
151.54
KB
-rwxr-xr-x
cpan
4.97
KB
-rwxr-xr-x
cpp
754.58
KB
-rwxr-xr-x
createdb
53.27
KB
-rwxr-xr-x
createlang
57.09
KB
-rwxr-xr-x
createuser
57.63
KB
-rwxr-xr-x
crontab
1.49
KB
-rwxr-xr-x
crontab.cagefs
49.13
KB
-rwxr-xr-x
csplit
48.82
KB
-rwxr-xr-x
ctags
237.98
KB
-rwxr-xr-x
curl
152.99
KB
-rwxr-xr-x
cut
40.61
KB
-rwxr-xr-x
cwebp
43.29
KB
-rwxr-xr-x
date
60.74
KB
-rwxr-xr-x
dbiprof
6.15
KB
-rwxr-xr-x
dbiproxy
5.35
KB
-rwxr-xr-x
dd
73.14
KB
-rwxr-xr-x
dehtmldiff
1.32
KB
-rwxr-xr-x
delv
39.98
KB
-rwxr-xr-x
df
102.55
KB
-rwxr-xr-x
diff
195.53
KB
-rwxr-xr-x
diff3
60.74
KB
-rwxr-xr-x
dig
146.97
KB
-rwxr-xr-x
dir
114.85
KB
-rwxr-xr-x
dircolors
40.44
KB
-rwxr-xr-x
dirname
28.31
KB
-rwxr-xr-x
display
7.04
KB
-rwxr-xr-x
dltest
11.05
KB
-rwxr-xr-x
dropdb
53.08
KB
-rwxr-xr-x
droplang
57.09
KB
-rwxr-xr-x
dropuser
53.05
KB
-rwxr-xr-x
du
110.34
KB
-rwxr-xr-x
dvipdf
1
KB
-rwxr-xr-x
dwebp
19.05
KB
-rwxr-xr-x
echo
32.31
KB
-rwxr-xr-x
ed
48.68
KB
-rwxr-xr-x
editdiff
2
KB
-rwxr-xr-x
egrep
290
B
-rwxr-xr-x
enc2xs
38.24
KB
-rwxr-xr-x
enchant
15.29
KB
-rwxr-xr-x
enchant-lsmod
11.13
KB
-rwxr-xr-x
env
28.33
KB
-rwxr-xr-x
eps2eps
639
B
-rwxr-xr-x
eqn
144.41
KB
-rwxr-xr-x
espdiff
1.53
KB
-rwxr-xr-x
ex
906.3
KB
-rwxr-xr-x
expand
32.48
KB
-rwxr-xr-x
expr
36.53
KB
-rwxr-xr-x
f95
754.58
KB
-rwxr-xr-x
factor
93.29
KB
-rwxr-xr-x
false
28.26
KB
-rwxr-xr-x
fc-cache
132
B
-rwxr-xr-x
fc-cache-64
15.45
KB
-rwxr-xr-x
fc-cat
15.4
KB
-rwxr-xr-x
fc-conflist
11.2
KB
-rwxr-xr-x
fc-list
11.26
KB
-rwxr-xr-x
fc-match
11.32
KB
-rwxr-xr-x
fc-pattern
11.26
KB
-rwxr-xr-x
fc-query
11.22
KB
-rwxr-xr-x
fc-scan
11.27
KB
-rwxr-xr-x
fc-validate
11.27
KB
-rwxr-xr-x
fgrep
290
B
-rwxr-xr-x
file
19.3
KB
-rwxr-xr-x
filterdiff
45.2
KB
-rwxr-xr-x
find
194.63
KB
-rwxr-xr-x
find2perl
23.06
KB
-rwxr-xr-x
fixcvsdiff
1.83
KB
-rwxr-xr-x
flex
318.07
KB
-rwxr-xr-x
flex++
318.07
KB
-rwxr-xr-x
flipdiff
48.7
KB
-rwxr-xr-x
flock
23.88
KB
-rwxr-xr-x
fmt
36.48
KB
-rwxr-xr-x
fold
36.46
KB
-rwxr-xr-x
free
19.33
KB
-rwxr-xr-x
funzip
31.38
KB
-rwxr-xr-x
g++
754.58
KB
-rwxr-xr-x
gawk
418.54
KB
-rwxr-xr-x
gcc
750.58
KB
-rwxr-xr-x
gcc-ar
26.45
KB
-rwxr-xr-x
gcc-nm
26.45
KB
-rwxr-xr-x
gcc-ranlib
26.45
KB
-rwxr-xr-x
gcov
311.45
KB
-rwxr-xr-x
gencat
22.11
KB
-rwxr-xr-x
geoiplookup
15.28
KB
-rwxr-xr-x
geoiplookup6
11.16
KB
-rwxr-xr-x
geqn
144.41
KB
-rwxr-xr-x
getconf
22.03
KB
-rwxr-xr-x
getent
26.39
KB
-rwxr-xr-x
getopt
15.38
KB
-rwxr-xr-x
gfortran
754.58
KB
-rwxr-xr-x
ghostscript
10.97
KB
-rwxr-xr-x
gif2webp
19.05
KB
-rwxr-xr-x
git
1.46
MB
-rwxr-xr-x
git-receive-pack
1.46
MB
-rwxr-xr-x
git-shell
717.95
KB
-rwxr-xr-x
git-upload-archive
1.46
MB
-rwxr-xr-x
git-upload-pack
791.44
KB
-rwxr-xr-x
gm
6.97
KB
-rwxr-xr-x
gmake
178.47
KB
-rwxr-xr-x
gneqn
271
B
-rwxr-xr-x
gnroff
3.31
KB
-rwxr-xr-x
gpg
732.4
KB
-rwxr-xr-x
gpg-agent
289.74
KB
-rwxr-xr-x
gpg-error
23.18
KB
-rwxr-xr-x
gpg-zip
3.23
KB
-rwxr-xr-x
gpg2
732.4
KB
-rwxr-xr-x
gpgsplit
48.88
KB
-rwxr-xr-x
gpgv
345.38
KB
-rwxr-xr-x
gpgv2
345.38
KB
-rwxr-xr-x
gpic
180.41
KB
-rwxr-xr-x
gprof
98.41
KB
-rwxr-xr-x
grep
155.3
KB
-rwxr-xr-x
grepdiff
45.2
KB
-rwxr-xr-x
groff
81.63
KB
-rwxr-xr-x
grops
140.85
KB
-rwxr-xr-x
grotty
98.59
KB
-rwxr-xr-x
groups
32.41
KB
-rwxr-xr-x
gs
10.97
KB
-rwxr-xr-x
gsbj
350
B
-rwxr-xr-x
gsdj
352
B
-rwxr-xr-x
gsdj500
352
B
-rwxr-xr-x
gslj
353
B
-rwxr-xr-x
gslp
350
B
-rwxr-xr-x
gsnd
277
B
-rwxr-xr-x
gsoelim
32.59
KB
-rwxr-xr-x
gtar
338.02
KB
-rwxr-xr-x
gtbl
115.96
KB
-rwxr-xr-x
gtroff
512.96
KB
-rwxr-xr-x
gunzip
2.2
KB
-rwxr-xr-x
gzexe
5.79
KB
-rwxr-xr-x
gzip
98.44
KB
-rwxr-xr-x
h2ph
27.65
KB
-rwxr-xr-x
h2xs
59.15
KB
-rwxr-xr-x
head
40.5
KB
-rwxr-xr-x
hexdump
32.02
KB
-rwxr-xr-x
host
127.02
KB
-rwxr-xr-x
hostid
28.3
KB
-rwxr-xr-x
hostname
15.41
KB
-rwxr-xr-x
hunspell
53.11
KB
-rwxr-xr-x
iconv
58.14
KB
-rwxr-xr-x
id
36.52
KB
-rwxr-xr-x
identify
7.06
KB
-rwxr-xr-x
idn
32.45
KB
-rwxr-xr-x
ifnames
4.03
KB
-rwxr-xr-x
igawk
3.11
KB
-rwxr-xr-x
import
7.04
KB
-rwxr-xr-x
infocmp
56.07
KB
-rwxr-xr-x
infotocap
64.26
KB
-rwxr-xr-x
install
139.64
KB
-rwxr-xr-x
instmodsh
4.15
KB
-rwxr-xr-x
interdiff
48.7
KB
-rwxr-xr-x
ionice
23.87
KB
-rwxr-xr-x
ipcrm
27.85
KB
-rwxr-xr-x
ipcs
48.36
KB
-rwxr-xr-x
isosize
23.83
KB
-rwxr-xr-x
ispell
988
B
-rwxr-xr-x
isql
31.69
KB
-rwxr-xr-x
iusql
23.61
KB
-rwxr-xr-x
join
48.75
KB
-rwxr-xr-x
kill
32.82
KB
-rwxr-xr-x
ld
982.58
KB
-rwxr-xr-x
ld.bfd
982.58
KB
-rwxr-xr-x
ldd
5.18
KB
-rwxr-xr-x
less
154.53
KB
-rwxr-xr-x
lessecho
11.11
KB
-rwxr-xr-x
lesskey
16.66
KB
-rwxr-xr-x
lesspipe.sh
2.24
KB
-rwxr-xr-x
lex
318.07
KB
-rwxr-xr-x
libnetcfg
15.36
KB
-rwxr-xr-x
libtool
314.04
KB
-rwxr-xr-x
libtoolize
76.8
KB
-rwxr-xr-x
link
28.3
KB
-rwxr-xr-x
ln
57.22
KB
-rwxr-xr-x
locale
37.11
KB
-rwxr-xr-x
localedef
318.31
KB
-rwxr-xr-x
logger
28.63
KB
-rwxr-xr-x
login
36.38
KB
-rwxr-xr-x
logname
28.31
KB
-rwxr-xr-x
look
11.27
KB
-rwxr-xr-x
lprsetup.sh
5.34
KB
-rwxr-xr-x
ls
114.85
KB
-rwxr-xr-x
lsdiff
45.2
KB
-rwxr-xr-x
lspgpot
1.06
KB
-rwxr-xr-x
lzma
73.61
KB
-rwxr-xr-x
m4
151.17
KB
-rwxr-xr-x
make
178.47
KB
-rwxr-xr-x
mcookie
15.44
KB
-rwxr-xr-x
md5sum
40.53
KB
-rwxr-xr-x
mdig
44.2
KB
-rwxr-xr-x
mesg
10.98
KB
-rwxr-xr-x
mkdir
77.9
KB
-rwxr-xr-x
mkfifo
61.58
KB
-rwxr-xr-x
mknod
65.61
KB
-rwxr-xr-x
mktemp
40.66
KB
-rwxr-xr-x
mogrify
7.04
KB
-rwxr-xr-x
montage
7.04
KB
-rwxr-xr-x
more
40.15
KB
-rwxr-xr-x
mv
127.3
KB
-rwxr-xr-x
my_print_defaults
6
MB
-rwxr-xr-x
mysql
7.15
MB
-rwxr-xr-x
mysql_config
5.11
KB
-rwxr-xr-x
mysqladmin
6.82
MB
-rwxr-xr-x
mysqlbinlog
7.12
MB
-rwxr-xr-x
mysqlcheck
6.84
MB
-rwxr-xr-x
mysqldump
6.9
MB
-rwxr-xr-x
mysqlimport
6.81
MB
-rwxr-xr-x
mysqlshow
6.81
MB
-rwxr-xr-x
namei
27.95
KB
-rwxr-xr-x
neqn
271
B
-rwxr-xr-x
net-snmp-create-v3-user
2.98
KB
-rwxr-xr-x
nice
32.32
KB
-rwxr-xr-x
nkf
266.84
KB
-rwxr-xr-x
nl
40.59
KB
-rwxr-xr-x
nm
41.4
KB
-rwxr-xr-x
nohup
32.42
KB
-rwxr-xr-x
nproc
32.37
KB
-rwxr-xr-x
nroff
3.31
KB
-rwxr-xr-x
nslookup
130.94
KB
-rwxr-xr-x
nsupdate
65.2
KB
-rwxr-xr-x
numfmt
64.71
KB
-rwxr-xr-x
objcopy
227.33
KB
-rwxr-xr-x
objdump
357.69
KB
-rwxr-xr-x
od
64.81
KB
-rwxr-xr-x
odbc_config
11.04
KB
-rwxr-xr-x
odbcinst
27.69
KB
-rwxr-xr-x
openssl
542.27
KB
-rwxr-xr-x
pango-list
11.1
KB
-rwxr-xr-x
pango-querymodules-64
28.26
KB
-rwxr-xr-x
pango-view
49.47
KB
-rwxr-xr-x
passwd
1.02
KB
-rwxr-xr-x
paste
32.34
KB
-rwxr-xr-x
patch
147
KB
-rwxr-xr-x
pathchk
32.31
KB
-rwxr-xr-x
pdf2dsc
698
B
-rwxr-xr-x
pdf2ps
909
B
-rwxr-xr-x
perl
11.14
KB
-rwxr-xr-x
perl.clean
462
B
-rwxr-xr-x
perl.prov
6.03
KB
-rwxr-xr-x
perl.prov.files
1014
B
-rwxr-xr-x
perl.req
10.56
KB
-rwxr-xr-x
perl.req.files
1.17
KB
-rwxr-xr-x
perl5.16.3
11.14
KB
-rwxr-xr-x
perl5i
11.2
KB
-rwxr-xr-x
perlbug
43.61
KB
-rwxr-xr-x
perlcritic
41.53
KB
-rwxr-xr-x
perldepgentest
4.03
KB
-rwxr-xr-x
perldl
39.58
KB
-rwxr-xr-x
perldoc
203
B
-rwxr-xr-x
perlindex
19.3
KB
-rwxr-xr-x
perlivp
10.52
KB
-rwxr-xr-x
perlsh
11.9
KB
-rwxr-xr-x
perlthanks
43.61
KB
-rwxr-xr-x
perltidy
114.19
KB
-rwxr-xr-x
perlver
10.28
KB
-rwxr-xr-x
pf2afm
498
B
-rwxr-xr-x
pfbtopfa
516
B
-rwxr-xr-x
pg_dump
305.75
KB
-rwxr-xr-x
pg_dumpall
73.89
KB
-rwxr-xr-x
pg_restore
126.79
KB
-rwxr-xr-x
pgawk
418.63
KB
-rwxr-xr-x
pgrep
27.67
KB
-rwxr-xr-x
php
6.09
MB
-rwxr-xr-x
php-cgi
6.09
MB
-rwxr-xr-x
php-config
4.42
KB
-rwxr-xr-x
phpize
4.65
KB
-rwxr-xr-x
pic
180.41
KB
-rwxr-xr-x
piconv
7.99
KB
-rwxr-xr-x
pinentry
2.54
KB
-rwxr-xr-x
pinentry-curses
49.19
KB
-rwxr-xr-x
ping
1.02
KB
-rwxr-xr-x
pinky
36.58
KB
-rwxr-xr-x
pkg-config
44.38
KB
-rwxr-xr-x
pkill
27.67
KB
-rwxr-xr-x
pl2pm
4.42
KB
-rwxr-xr-x
pmap
27.61
KB
-rwxr-xr-x
pod2html
4
KB
-rwxr-xr-x
pod2latex
10.1
KB
-rwxr-xr-x
pod2man
13.26
KB
-rwxr-xr-x
pod2text
10.75
KB
-rwxr-xr-x
pod2usage
3.67
KB
-rwxr-xr-x
podchecker
3.7
KB
-rwxr-xr-x
podselect
2.55
KB
-rwxr-xr-x
post-grohtml
187.55
KB
-rwxr-xr-x
pphs
404
B
-rwxr-xr-x
pr
65.11
KB
-rwxr-xr-x
pre-grohtml
86.24
KB
-rwxr-xr-x
precat
5.52
KB
-rwxr-xr-x
preunzip
5.52
KB
-rwxr-xr-x
prezip
5.52
KB
-rwxr-xr-x
prezip-bin
11.05
KB
-rwxr-xr-x
printafm
395
B
-rwxr-xr-x
printenv
28.29
KB
-rwxr-xr-x
printf
48.61
KB
-rwxr-xr-x
prove
13.13
KB
-rwxr-xr-x
ps
97.77
KB
-rwxr-xr-x
ps2ascii
631
B
-rwxr-xr-x
ps2epsi
2.69
KB
-rwxr-xr-x
ps2pdf
272
B
-rwxr-xr-x
ps2pdf12
215
B
-rwxr-xr-x
ps2pdf13
215
B
-rwxr-xr-x
ps2pdf14
215
B
-rwxr-xr-x
ps2pdfwr
1.07
KB
-rwxr-xr-x
ps2ps
647
B
-rwxr-xr-x
ps2ps2
669
B
-rwxr-xr-x
psed
52.08
KB
-rwxr-xr-x
psql
438.74
KB
-rwxr-xr-x
pstruct
35.75
KB
-rwxr-xr-x
ptx
65.09
KB
-rwxr-xr-x
pwd
32.45
KB
-rwxr-xr-x
pwdx
11.27
KB
-rwxr-xr-x
pydoc
78
B
-rwxr-xr-x
python
6.98
KB
-rwxr-xr-x
python2
6.98
KB
-rwxr-xr-x
python2.7
6.98
KB
-rwxr-xr-x
ranlib
61.22
KB
-rwxr-xr-x
raw
15.27
KB
-rwxr-xr-x
readelf
505.77
KB
-rwxr-xr-x
readlink
40.82
KB
-rwxr-xr-x
realpath
61.23
KB
-rwxr-xr-x
recode
39.87
KB
-rwxr-xr-x
recountdiff
3.36
KB
-rwxr-xr-x
red
89
B
-rwxr-xr-x
rediff
36.04
KB
-rwxr-xr-x
reindexdb
57.27
KB
-rwxr-xr-x
rename
11.26
KB
-rwxr-xr-x
renice
11.2
KB
-rwxr-xr-x
replace
3.48
MB
-rwxr-xr-x
reset
19.6
KB
-rwxr-xr-x
rev
11.26
KB
-rwxr-xr-x
rm
61.4
KB
-rwxr-xr-x
rmdir
44.46
KB
-rwxr-xr-x
rpcgen
90.45
KB
-rwxr-xr-x
rsync
484.2
KB
-rwxr-xr-x
run-with-aspell
85
B
-rwxr-xr-x
runcon
32.47
KB
-rwxr-xr-x
rvi
906.3
KB
-rwxr-xr-x
rview
906.3
KB
-rwxr-xr-x
rvim
2.23
MB
-rwxr-xr-x
s2p
52.08
KB
-rwxr-xr-x
scl
19.5
KB
-rwxr-xr-x
scl_enabled
258
B
-rwxr-xr-x
scl_source
1.83
KB
-rwxr-xr-x
scp
89.24
KB
-rwxr-xr-x
script
19.61
KB
-rwxr-xr-x
sdiff
48.48
KB
-rwxr-xr-x
sed
74.29
KB
-rwxr-xr-x
selectorctl
7.63
KB
-rwxr-xr-x
seq
48.47
KB
-rwxr-xr-x
setsid
11.23
KB
-rwxr-xr-x
setterm
27.48
KB
-rwxr-xr-x
sftp
142.02
KB
-rwxr-xr-x
sh
941.93
KB
-rwxr-xr-x
sha1sum
36.57
KB
-rwxr-xr-x
sha224sum
40.63
KB
-rwxr-xr-x
sha256sum
40.63
KB
-rwxr-xr-x
sha384sum
40.65
KB
-rwxr-xr-x
sha512sum
40.65
KB
-rwxr-xr-x
shred
52.94
KB
-rwxr-xr-x
shuf
49.13
KB
-rwxr-xr-x
size
32.36
KB
-rwxr-xr-x
skill
23.62
KB
-rwxr-xr-x
slabtop
19.52
KB
-rwxr-xr-x
sleep
32.35
KB
-rwxr-xr-x
slogin
756.41
KB
-rwxr-xr-x
snice
23.62
KB
-rwxr-xr-x
snmpconf
25.52
KB
-rwxr-xr-x
soelim
32.59
KB
-rwxr-xr-x
sort
114.95
KB
-rwxr-xr-x
spell
122
B
-rwxr-xr-x
splain
18.03
KB
-rwxr-xr-x
split
69.47
KB
-rwxr-xr-x
splitdiff
3.11
KB
-rwxr-xr-x
sprof
22.1
KB
-rwxr-xr-x
sqlite3
54.95
KB
-rwxr-xr-x
ssh
756.41
KB
-rwxr-xr-x
ssh-add
352.46
KB
-rwxr-xr-x
ssh-agent
373.26
KB
---x--x--x
ssh-copy-id
10.22
KB
-rwxr-xr-x
ssh-keygen
409.38
KB
-rwxr-xr-x
ssh-keyscan
430.69
KB
-rwxr-xr-x
stat
77.19
KB
-rwxr-xr-x
stdbuf
64.88
KB
-rwxr-xr-x
strace
1009.21
KB
-rwxr-xr-x
stream
7.04
KB
-rwxr-xr-x
strings
28.43
KB
-rwxr-xr-x
strip
227.32
KB
-rwxr-xr-x
stty
68.61
KB
-rwxr-xr-x
sum
36.55
KB
-rwxr-xr-x
svn
232.45
KB
-rwxr-xr-x
sync
28.33
KB
-rwxr-xr-x
tabs
15.31
KB
-rwxr-xr-x
tac
32.48
KB
-rwxr-xr-x
tail
65.26
KB
-rwxr-xr-x
tailf
23.88
KB
-rwxr-xr-x
tar
338.02
KB
-rwxr-xr-x
taskset
32.22
KB
-rwxr-xr-x
tbl
115.96
KB
-rwxr-xr-x
tclsh
7
KB
-rwxr-xr-x
tclsh8.5
7
KB
-rwxr-xr-x
tee
32.38
KB
-rwxr-xr-x
test
36.46
KB
-rwxr-xr-x
tic
64.26
KB
-rwxr-xr-x
time
15.55
KB
-rwxr-xr-x
timeout
53.31
KB
-rwxr-xr-x
tload
15.38
KB
-rwxr-xr-x
tmpwatch
27.87
KB
-rwxr-xr-x
toe
15.43
KB
-rwxr-xr-x
top
104.38
KB
-rwxr-xr-x
touch
61.02
KB
-rwxr-xr-x
tput
15.41
KB
-rwxr-xr-x
tr
44.61
KB
-rwxr-xr-x
traceroute
61.86
KB
-rwxr-xr-x
troff
512.96
KB
-rwxr-xr-x
true
28.26
KB
-rwxr-xr-x
truncate
52.67
KB
-rwxr-xr-x
tset
19.6
KB
-rwxr-xr-x
tsort
36.47
KB
-rwxr-xr-x
tty
28.29
KB
-rwxr-xr-x
tzselect
7.17
KB
-rwxr-xr-x
ul
19.47
KB
-rwxr-xr-x
uname
32.3
KB
-rwxr-xr-x
unexpand
32.45
KB
-rwxr-xr-x
uniq
44.71
KB
-rwxr-xr-x
unix-lpr.sh
4.07
KB
-rwxr-xr-x
unlink
28.3
KB
-rwxr-xr-x
unwrapdiff
5.8
KB
-rwxr-xr-x
unzip
181.16
KB
-rwxr-xr-x
unzipsfx
88.64
KB
-rwxr-xr-x
uptime
11.22
KB
-rwxr-xr-x
users
32.42
KB
-rwxr-xr-x
utmpdump
15.45
KB
-rwxr-xr-x
uudecode
103.99
KB
-rwxr-xr-x
uuencode
103.98
KB
-rwxr-xr-x
vacuumdb
57.35
KB
-rwxr-xr-x
vdir
114.85
KB
-rwxr-xr-x
vi
906.3
KB
-rwxr-xr-x
view
906.3
KB
-rwxr-xr-x
vim
2.23
MB
-rwxr-xr-x
vimdiff
2.23
MB
-rwxr-xr-x
vimtutor
2.04
KB
-rwxr-xr-x
vmstat
31.48
KB
-rwxr-xr-x
watch
24.14
KB
-rwxr-xr-x
wc
40.67
KB
-rwxr-xr-x
webpmux
27.14
KB
-rwxr-xr-x
wget
408.96
KB
-rwxr-xr-x
whereis
20.2
KB
-rwxr-xr-x
which
23.77
KB
-rwxr-xr-x
who
48.7
KB
-rwxr-xr-x
whoami
28.3
KB
-rwxr-xr-x
word-list-compress
11.03
KB
-rwxr-xr-x
x86_64-redhat-linux-c++
754.58
KB
-rwxr-xr-x
x86_64-redhat-linux-g++
754.58
KB
-rwxr-xr-x
x86_64-redhat-linux-gcc
750.58
KB
-rwxr-xr-x
xargs
60.91
KB
-rwxr-xr-x
xmlcatalog
15.3
KB
-rwxr-xr-x
xmllint
61.94
KB
-rwxr-xr-x
xmlwf
24
KB
-rwxr-xr-x
xsltproc
23.5
KB
-rwxr-xr-x
xsubpp
4.45
KB
-rwxr-xr-x
xxd
14.42
KB
-rwxr-xr-x
xz
73.61
KB
-rwxr-xr-x
yacc
84.48
KB
-rwxr-xr-x
yes
28.3
KB
-rwxr-xr-x
zcat
1.9
KB
-rwxr-xr-x
zcmp
1.72
KB
-rwxr-xr-x
zdiff
5.63
KB
-rwxr-xr-x
zegrep
123
B
-rwxr-xr-x
zfgrep
123
B
-rwxr-xr-x
zforce
2.09
KB
-rwxr-xr-x
zgrep
5.99
KB
-rwxr-xr-x
zip
210.78
KB
-rwxr-xr-x
zipcloak
98.1
KB
-rwxr-xr-x
zipgrep
2.88
KB
-rwxr-xr-x
zipinfo
181.16
KB
-rwxr-xr-x
zipnote
93.73
KB
-rwxr-xr-x
zipsplit
97.75
KB
-rwxr-xr-x
zless
1.99
KB
-rwxr-xr-x
zmore
2.79
KB
-rwxr-xr-x
znew
5.22
KB
-rwxr-xr-x
zsh
723.13
KB
-rwxr-xr-x
zsoelim
32.59
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : perldl
#!/usr/bin/perl eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if 0; # not running under some shell eval 'exec perl -S $0 "$@"' if 0; ########################################################################## # Here starts the actual script # Simple shell for PDL use vars qw($VERSION $HOME $Modules); $VERSION = '1.357'; print "perlDL shell v$VERSION PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file 'COPYING' in the PDL distribution. This is free software and you are welcome to redistribute it under certain conditions, see the same file for details.\n"; # Useful shell variables $PERLDL::ESCAPE = '#'; # Default shell escape $PERLDL::HISTFILESIZE = 500; # Number of lines to keep in history $PERLDL::MULTI = 1; # Enable multi-lines by default $PERLDL::NO_EOF = 0; # Disable EOF protection by default $PERLDL::NO_EOF = 1 if $^O =~ 'MSWin'; # ...but enable for windows $PERLDL::PROMPT = "pdl> "; $PERLDL::PREFIX_RE = qr(^\s*(?:pdl|perldl)>\s*); # RE for shell prompts $PERLDL::PAGER = (exists $ENV{PAGER} ? $ENV{PAGER} : 'more'); # Default output paging program $PERLDL::PAGE = 0; $PERLDL::PAGING = 0; @PERLDL::AUTO = (); $PERLDL::PREPROCESS = undef; # old interface -- disabled @PERLDL::PREPROCESS = (); # new preprocessor pipeline $HOME = $ENV{HOME}; # Useful in shell if ($^O =~ /win32/i and $HOME eq ""){ $HOME = $ENV{USERPROFILE}; $HOME =~ s/\\/\//g; } $,=" "; # Default $Modules = $Modules = ""; # pacify -w sub mypdlconfig { require Config; # pick up perl version info eval 'require PDL::Version' if not defined $PDL::Version::VERSION; eval 'require PDL::Config'; eval "use Data::Dumper"; my $hasdumper = $@ eq "" ? 1 : 0; eval "use PDL::Bad;"; my $bflag = defined($PDL::Bad::Status) && $PDL::Bad::Status; my $txt = "\nSummary of my PDL configuration\n\n"; $txt .= "VERSION: PDL v$PDL::Version::VERSION"; $txt .= " (supports bad values)" if $bflag; $txt .= "\n\n"; if ($hasdumper && %PDL::Config) { $txt .= Data::Dumper->Dump([{%PDL::Config}],['%PDL::Config']); } else { $txt .= "Could not obtain \%PDL::Config\n"; } $txt .= Config::myconfig(); # append perl config info } sub preproc_registered ($) { my ($sub) = @_; die "preprocessors must be code references" unless ref $sub eq 'CODE'; return grep ($_ == $sub, @PERLDL::PREPROCESS) > 0; } sub preproc_add ($) { my ($sub) = @_; die "preprocessors must be code references" unless ref $sub eq 'CODE'; push @PERLDL::PREPROCESS, $sub; return $sub; } sub preproc_del ($) { my ($sub) = @_; die "preprocessors must be code references" unless ref $sub eq 'CODE'; die "preprocessor can't be deleted: not installed" unless preproc_registered $sub; @PERLDL::PREPROCESS = grep ($_ != $sub, @PERLDL::PREPROCESS); return $sub; } # Parse ARGV my $read_from_file; while(defined($_ = shift @ARGV)) { if($_ eq "-tk") { if ($^O eq 'MSWin32') { print "-tk option not supported for windows\n"; next; } print "Using Tk"; eval "use Tk;"; if ($@ eq "") { print " v$Tk::VERSION\n" if defined $Tk::VERSION; # make -w happy } else { print ", sorry can't load module Tk\n"; } next; } elsif($_ eq "-glut") { if ($^O eq 'MSWin32') { print "-glut option not supported for windows\n"; next; } print "Using OpenGL for GLUT support"; eval "use OpenGL;"; if ($@ eq "") { print " v$OpenGL::VERSION\n" if defined $OpenGL::VERSION; # make -w happy } else { print ", sorry can't load module OpenGL\n"; } OpenGL::glutInit() unless OpenGL::done_glutInit(); next; } elsif(/^-f(.*)/) { my $file = $1; if(0 == length $1) { $file = shift @ARGV; } print "Doing '$file'\n"; do $file; if($@) { die "Initialization error: $@"; } next; } elsif(/^-w$/){ $^W = 1; next; } elsif (/^-(M|m)([\w:]+)(\=\w+)?$/x) { my ($way,$m,@im) = ($1,$2,$3?substr($3,1):()); eval "require $m"; warn, next if $@; if ($way eq 'M') { $m->import(@im); } else { $m->unimport(@im); } } elsif (/^-I (\S*) $/x) { my $dir = $1; $dir = $ARGV[++$arg] if !$dir; if ($dir =~ m{^ \/ }x) { unshift(@INC, $dir); } else { require FindBin; die "Error: can't find myself" if ! $FindBin::Bin; unshift(@INC, "$FindBin::Bin/$dir"); } } elsif (/^-V\s*$/) { print mypdlconfig(); exit 0; } elsif( /^-\s*$/) { $read_from_file = 1; last; } else { print << 'EOP'; Usage: perldl [options] -glut try to load OpenGL module (Enables readline event-loop processing). -tk try to load Tk module (Enables readline event-loop processing). -f <file> execute file <file> before starting perldl -w run with warning messages turned-on -m <module> unload module <module> -M <module> load module <module> -I <dir> Add <dir> to include path. -V print PDL version info (e.g. for a bug report) - Following arguments are files for input. EOP die("Unknown argument $_"); } } my $readlines; if(!$read_from_file and -t STDIN) { eval "use Term::ReadLine"; $readlines = ($@ eq ""); } else { $readlines=0; } my @enabled = (); push @enabled, "ReadLines" if $readlines; eval 'use PDL::NiceSlice'; unless ($@) { my $report = 0; sub report { my $ret = $report; $report = $_[0] if $#_ > -1; return $ret; } my $preproc = sub { my ($txt) = @_; my $new = PDL::NiceSlice::perldlpp('main',$txt); print STDERR "processed $new\n" if report && $new ne $txt; return $new; }; sub trans { preproc_add $preproc unless preproc_registered $preproc; preproc_del $preproc if $#_ > -1 && !$_[0] && preproc_registered $preproc; } sub notrans { trans 0 } trans; # switch on by default push @enabled, "NiceSlice"; } eval "use Text::Balanced"; my $multi_ok = ($@ eq ""); $PERLDL::MULTI = 0 unless($multi_ok); push @enabled,"MultiLines" if $multi_ok; print join(', ',@enabled)," enabled\n" if @enabled > 0; if ( $readlines ){ $PERLDL::TERM = Term::ReadLine->new('perlDL', \*STDIN, \*STDOUT); if (defined &OpenGL::done_glutInit ) { # Attempt to use with FreeGLUT if ($PERLDL::TERM->can('event_loop')) { print "Using FreeGLUT event loop\n"; # Presumably, if you're using this loop, you're also selecting on other # fileno's. It is up to you to add that in to the wait callback (first # one passed to event_loop) and deal with those file handles. $PERLDL::TERM->event_loop( sub { # This callback is called every time T::RL wants to # read something from its input. The parameter is # the return from the other callback. my $fileno = shift; my $rvec = ''; vec($rvec, $fileno, 1) = 1; while(1) { select my $rout = $rvec, undef, undef, 0; last if vec($rout, $fileno, 1); OpenGL::glutMainLoopEvent(); } }, sub { # This callback is called as the T::RL is starting up # readline the first time. The parameter is the file # handle that we need to monitor. The return value # is used as input to the previous callback. # We return the fileno that we will use later. # cygwin/TRL::Gnu seems to use some other object here # that doesn't respond to a fileno method call (rt#81344) fileno($_[0]); } ) unless $Term::ReadLine::toloop; } else { warn("Sorry, cannot use FreeGLUT with this version of ReadLine\n"); } } if(defined &Tk::DoOneEvent and not ref $Term::ReadLine::toloop) { # Attempt to use with Tk if(${$PERLDL::TERM->Features}{tkRunning}) { print "Using Tk event loop\n"; $PERLDL::TERM->tkRunning(1); } else { warn("Sorry, cannot use Tk with this version of ReadLine\n"); } } if ( ( -e "$HOME/.perldl_hist" ) && ( open HIST, "<$HOME/.perldl_hist" ) ) { my @allhist = <HIST>; close HIST; map s/\n//g , @allhist ; foreach (@allhist) { $PERLDL::TERM->addhistory($_); } } eval <<'EOEND'; sub END { # Save History in $ENV{'HOME'}/.perldl_hist # GetHistory doesn't work on all versions... my @a= $PERLDL::TERM->GetHistory() if $PERLDL::TERM->can('GetHistory'); $#a-- if $a[-1] =~ /^(q$|x$|\s*exit\b|\s*quit\b)/; # chop off the exit command @a= @a[($#a-$PERLDL::HISTFILESIZE+1)..($#a)] if $#a > $PERLDL::HISTFILESIZE-1 ; if( open HIST, ">$HOME/.perldl_hist" ) { print HIST join("\n",@a); close HIST; } else { print " Unable to open \"$HOME/.perldl_hist\"\n"; } } EOEND } sub l { if ($readlines) { my $n = $#_ > -1 ? shift : 20; my @h = $PERLDL::TERM->GetHistory(); my $min = $#h < $n-1 ? 0 : $#h-$n+1; map {print "$_: $h[$_]\n"} ($min..$#h); } } sub page { $PERLDL::PAGE = (defined $_[0] ? $_[0] : 1); } sub nopage { page(0); } sub startpage { if ($PERLDL::PAGE) { open(SAVEOUT, '>&STDOUT'); open(STDOUT, "| $PERLDL::PAGER"); $PERLDL::PAGING = 1; } } sub endpage { if ($PERLDL::PAGING) { close(STDOUT); open(STDOUT, '>&SAVEOUT'); $PERLDL::PAGING = 0; } } sub startup_def { return "PDL/default.pdl" if $^O =~ /win32/i; return "PDL/default.perldlrc"; } # Global and local startup my $startup_file = -e "$HOME/.perldlrc" ? "$HOME/.perldlrc" : startup_def(); print "Reading $startup_file...\n"; eval 'require "'.$startup_file.'"'; my $PDL_OK = ($@ eq ""); if ($PDL_OK) { require PDL::Version if not defined $PDL::Version::VERSION; print "Type 'demo' for online demos\n"; eval "use PDL::Bad;"; my $bflag = defined($PDL::Bad::Status) && $PDL::Bad::Status; if ( $bflag ) { print "Loaded PDL v$PDL::Version::VERSION (supports bad values)\n"; } else { print "Loaded PDL v$PDL::Version::VERSION\n"; } }else{ warn "WARNING: Error loading PDL: '$@' - trying blib. \n"; eval "use blib"; delete $INC{$startup_file}; # so require will try again! eval 'require "'.$startup_file.'"'; $PDL_OK = ($@ eq ""); if ($PDL_OK) { require PDL::Version if not defined $PDL::Version::VERSION; print "Loaded PDL v$PDL::Version::VERSION\n"; }else{ warn "WARNING: PDL startup not found only plain perl available\n"; $PERLDL::PROMPT = 'perl> '; # so there is visual indication of no PDL eval << 'EOD'; # Fallback eval routine - proper one defined in PDL::Core sub eval_and_report { my $__code = shift; # Can be code ref or string my $__string; $__string = (ref $__code eq "CODE") ? '&$__code()' : $__code; eval $__string; # Use boring eval() which misses some errors return $@; } EOD } } print "\nNote: AutoLoader not enabled ('use PDL::AutoLoader' recommended)\n\n" unless defined($PDL::AutoLoader::Rescan); if (-e 'local.perldlrc') { print "Reading local.perldlrc ...\n"; require 'local.perldlrc' ; } # Short hand for some stuff sub p { local $^W=0; print(@_); } # suppress possible undefined var message # (dirty) my %demos = ( 'pdl' => 'PDL::Demos::General', # have to protect pdl as it means something '3d' => 'PDL::Demos::TriD1', '3d2' => 'PDL::Demos::TriD2', '3dgal' => 'PDL::Demos::TriDGallery', 'pgplot' => 'PDL::Demos::PGPLOT_demo', 'ooplot' => 'PDL::Demos::PGPLOT_OO_demo', # note: lowercase 'bad' => 'PDL::Demos::BAD_demo', 'bad2' => 'PDL::Demos::BAD2_demo', 'transform' => 'PDL::Demos::Transform_demo', 'cartography' => 'PDL::Demos::Cartography_demo', 'gnuplot' => 'PDL::Demos::Gnuplot_demo', 'prima' => 'PDL::Demos::Prima', ); sub demo { local $_ = lc $_[0] ; if(/^$/) { print <<EOD; Use: demo pdl # general demo demo 3d # 3d demo (requires TriD with OpenGL or Mesa) demo 3d2 # 3d demo, part 2. (Somewhat memory-intensive) demo 3dgal # the 3D gallery: make cool images with 3-line scripts demo pgplot # PGPLOT graphics output (Req.: PGPLOT) demo OOplot # PGPLOT OO interface (Req.: PGPLOT) demo gnuplot # Gnuplot graphics (requires PDL::Graphics::Gnuplot) demo prima # Prima graphics (requires PDL::Graphics::Prima) demo transform # Coordinate transformations (Req.: PGPLOT) demo cartography # Cartographic projections (Req.: PGPLOT) demo bad # Bad-value demo (Req.: bad value support) demo bad2 # Bad-values, part 2 (Req.: bad value support and PGPLOT) EOD return; } # if: /^$/ if ( exists $demos{$_} ) { require PDL::Demos::Screen; # Get the routines for screen demos. my $name = $demos{$_}; eval "require $name;"; # see docs on require for need for eval $name .= "::run"; &{$name}(); } else { print "No such demo!\n"; } } # sub: demo $SIG{'INT'} = sub { die "Ctrl-C detected\n" }; # Ctrl-C handler my $preproc_warned = 0; sub preproc_oldwarn { warn << 'EOW'; Deprecated usage: $PERLDL::PREPROCESS was set. Usage of this variable is now strongly deprecated. To enable preprocessing with recent versions of perldl you should use the 'preproc_add' function. For details check the perldl manpage. EOW $preproc_warned = 1; # warn only once } # # count_tags: Return a string containing (in order) the open brackets # and strings in the string that is passed in. Used for multi-line parsing. # # Works by analysing the error message returned by Text::Balanced -- this # is sort of fragile against changes in Text::Balanced, but what the heck. # --CED 18-Mar-2003 # sub count_tags { my $s = shift; $s =~ s/\\.//g; # Ignore all escaped characters return undef unless($s =~ m/[^\s]/); # [Ignore quotelike operators: they cause more trouble than they're worth!] our($prefix,$delim,%closers); unless(defined $prefix) { $delim = '{[(`\'")]}'; %closers = ('{'=>'}','['=>']','('=>')'); } # Run Text::Balanced on the string with a '{' in front of it, to # make sure that all quoted strings are "embedded" in the outermost "{". # The whitespace works around a short-string bug in extract_bracketed. my $a; my @result; $s =~ s/^\s*\#.*$//mg; # Eliminate comment lines before extract. eval { @result = Text::Balanced::extract_bracketed("{".$s, $delim, $prefix); $a = $@; }; print "a = $a\nreturn = '",join("','",@result),"'\n" if($PERLDL::debug); if($a =~ m/^Did not find/) { # No quotes -- this should never happen and is a syntax error. print STDERR "[Error in parsing: this should never happen!]\n" if($PERLDL::debug); return undef; } elsif($a =~ m/^Unmatched emb\w+ quote \((.)\), de\w+ at offset (\d+)/) { # Embedded quote: try to close it and reparse. $a = $1; return count_tags($s.$1) . $a; } elsif($a =~ m/^Mismatched closing bracket/) { # This is an error condition - return false and let perl parse it return undef; } elsif($a =~ m/^Unmatched opening bracket\(s\)\: \{\.\.(.\.\.)+/) { $a = $1; $a=~ s/\.\.//g; return count_tags($s.$closers{$a}) . $a; } elsif($a =~ m/^Unmatched opening bracket\(s\)\: \{\.\.\,/) { # Should have exactly one unmatched opening bracket. return undef; } elsif(!$a) { return undef; } print STDERR "Unknown error message '$a' from parser...\n" if($PERLDL::debug); return undef; } # # process_input -- this is the central grab-some-input-and-execute it loop. # sub process_input { my $lines; if($PERLDL::MULTI && !$multi_ok) { $PERLDL::MULTI = 0; print STDERR "WARNING: Text::Balanced not present; disabling multi-line parsing.\n"; } # The {} around the do let us get out with 'last' in the EOF case. multiline: { my $cont; $lines = ""; do { local $, = ""; my $prompt = $cont ? "..$cont".(" "x(5-length($cont)))."> " : ((ref $PERLDL::PROMPT) ? &$PERLDL::PROMPT : $PERLDL::PROMPT); if ($readlines) { $_ = $PERLDL::TERM->readline($prompt); }else{ print $prompt if(-t ARGV); # Don't print prompt in pipes $_ = <>; } if(!defined $_) { if($cont) { if( $PERLDL::NO_EOF > 1 && -t STDIN ) { print STDERR "\nEOF ignored. (Close delimiters to end block. \$PERLDL::NO_EOF = $PERLDL::NO_EOF)\n"; } else { last multiline; } } else { if($PERLDL::NO_EOF && -t STDIN ) { print STDERR "EOF ignored. ('q' or 'exit' to quit. \$PERLDL::NO_EOF = $PERLDL::NO_EOF)\n"; } else { print STDERR "EOF detected, exiting shell.\n"; exit 0; } } } $lines .= "\n" if($cont); # Make multi-line strings work right. $lines .= $_; print "lines = $lines\n" if($PERLDL::debug); } while( $PERLDL::MULTI && ($cont = count_tags($lines)) ); } # Execute the list of auto-code for my $c (@PERLDL::AUTO) { my $mess = eval_and_report($c); warn $mess if $mess; } # Filter out PDL shell prefixes from cut-n-pasted lines if ( $lines =~ s/$PERLDL::PREFIX_RE// and $readlines ) { my @hist = $PERLDL::TERM->GetHistory(); foreach my $entry (@hist) { $entry =~ s/$PERLDL::PREFIX_RE//; } $PERLDL::TERM->SetHistory(@hist); } if(!defined $lines || lc $lines eq 'q' || lc $lines eq 'x' || lc $lines eq 'quit') {exit}; next if $lines =~/^\s*$/; # Blank line - do nothing $lines =~ s/^\s*\?\?\s*/apropos /; # Make '??' = 'apropos' $lines =~ s/^\s*\?\s*/help /; # Make lone '?' = 'help' if ( $lines =~ /^\s*(help|usage|apropos|sig|badinfo|demo)\s+/) { # Allow help foo (no quotes) my @t = split(/\s+/,$lines); my $a; foreach $a(@t) { $a=~s/^["']+//; $a=~s/['"]+$//; }; $t[1] = "'".$t[1]."'" if ($#t == 1 && !($t[1] =~ /^\$/)); $lines = join(' ',@t); } if (substr($lines,0,1) eq substr($PERLDL::ESCAPE,0,1) and substr($lines,0,2) ne '#!') { # Allow escapes, avoid shebang my @lines = split /\n/, $lines; system(substr(shift @lines,1)); # Shell escape $lines = join("\n",@lines); next; } else { # Send code to pre-processor filters if defined for my $filter (@PERLDL::PREPROCESS) { $lines = $filter->($lines); } # honor the deprecated interface for now if (defined $PERLDL::PREPROCESS && ref($PERLDL::PREPROCESS) eq 'CODE') { preproc_oldwarn() unless $preproc_warned; $lines = &$PERLDL::PREPROCESS($_); } startpage; my $mess = eval_and_report($lines); warn $mess if $mess; endpage; } print "\n"; } ###################################################################### ###################################################################### ##### ##### Main loop is here! (Commands not inside any sub!) # check for old usage of PERLDL::PREPROCESS if (defined $PERLDL::PREPROCESS) { preproc_oldwarn() unless $preproc_warned; } $|=1; while(1) { eval {process_input()}; if ($@) { if ($@ =~ /Ctrl-C detected/) { print "Ctrl-C detected\n"; next; } else { print "Unknown error: $@\n exiting...\n"; last; } } } ##### ##### ###################################################################### ###################################################################### # Work routine to eval code and post-process messages # Currently used by 'perldl' shell sub eval_and_report { my $__code = shift; # Can be code ref or string $@ = ""; # clear $@ since we might not execute the eval below ## Compile the code ref to execute. The code gets put inside {} braces ## so that there is a trivial loop (the simple block) for 'last' and 'next' ## to escape from. (Otherwise perl 5.6.1 and 5.8 do a little fandango ## on stack if you type "last" at the shell). --CED 18-Mar-2003 my $__coderef = (ref $__code eq "CODE") ? $__code : eval << "EOD" sub { { $__code; } } EOD ; %@ = (); # Workaround to prevent spurious loss of $@ in early (pre-5.14 anyway) versions of perl if( (!$@) and (ref $__coderef eq 'CODE')) { eval { &$__coderef(); die $@ if($@); }; } if ($@) { my $mess = $@; # Remove surplus parts $mess =~ s/^\s*\(in cleanup\)\s+//; # 'cleanup ...' from Usage:... $mess =~ s/\n\s*\(in cleanup\).*$//; # 'cleanup...'s at end $mess =~ s/\s+at \(eval \d+\) line \d+\.?$//; # at eval ?? line ??. return $mess; # Report error } return ""; } __END__ =head1 NAME perldl - Simple shell for PDL (see also L<pdl2>) =head1 SYNOPSIS Use PDL interactively: bash$ perldl pdl> $a = sequence(10) # or any other perl or PDL command bash$ pdl pdl> print "Hello, world!\n"; Run a script: bash$ cat > pdlscript #!/usr/bin/pdl print "Hello, world!\n"; ... =head1 DESCRIPTION The program B<perldl> is a simple shell (written in perl) for interactive use of PDL. It consists of a command-line interface that supports immediate interpretation of perl commands and expressions. Perl expressions, including PDL constructs, can be entered directly at the keyboard and are compiled and executed immediately. The syntax is not exactly identical to Perl, in that under most circumstances ending a line causes immediate execution of the command entered so far (no trailing ';' is required). The synonym B<pdl> is a compiled executable that is useful as a script interpreter using UNIX shebang (C<#!>) syntax. This is useful for generating and re-executing command-journal files from B<perldl>. The B<perldl> shell runs an initial startup file (C<~/.perldlrc>) that can be used to pre-load perl modules or configure the global perl environment. It features a path mechanism for autoloading perl subroutines. There is a command-history mechanism, and several other useful features such as command preprocessing, shortcuts for commonly used commands such as "print", and the ability to execute arbitrary code whenever a prompt is printed. Depending on your configuration settings, B<perldl> can be set to honor or ignore the ^D (end-of-file) character when sent from a terminal, or to attempt to do the Right Thing when a block construct spanning multiple lines is encountered. B<perldl> and B<pdl> support several command-line options, which are discussed near the end of this document. =head2 Reference manual & online help The PDL reference manual and online help are available from within B<perldl>, using the B<help> and B<apropos> commands (which may also be abbreviated B<?> and B<??>.) The B<help> command alone prints a summary of help syntax, and B<< help <module-name> >> will print POD documentation from the module you mention (POD is the Perl format for embedding documentation in your perl code; see L<perlpod> for details). If you include POD documentation in your autoload subroutines (see B<path mechanism> below), then both B<help> and B<apropos> will find it and be able to format and display it on demand. =head2 History mechanism If you have the perl modules ReadLines and ReadKeys installed, then B<perldl> supports a history and line-editing mechanism using editing keys similar to L<emacs>. The last 500 commands are always stored in the file F<.perldl_hist> in your home directory between sessions. Set C<$PERLDL::HISTFILESIZE> to change the number of lines saved. The command C<l [number]> shows you the last C<number> commands you typed where C<number> defaults to 20. e.g.: bash$ perldl ReadLines enabled pdl> $a = rfits "foo.fits" BITPIX = -32 size = 88504 pixels Reading 354016 bytes BSCALE = && BZERO = pdl> imag log($a+400) Displaying 299 x 296 image from 4.6939525604248 to 9.67116928100586 ... =head2 Command execution If you enter a simple command at the B<perldl> command line, it is immediately executed in a Perl C<eval()>. The environment is almost identical to that within a perl script, with some important exceptions: =over 3 =item * $_ is not preserved across lines $_ is used to hold the command line for initial processing, so at the beginning of processing of each command line, $_ contains the command itself. Use variables other than $_ to store values across lines. =item * Scope is not preserved across lines Each command line is executed in a separate C<eval> block within perl, so scoping commands such as C<my> and C<local> may not perform exactly as expected -- in particular, if you declare a variable with C<my>, it is local to the particular command line on which you typed the C<my> command, which means that it will evaporate before the next prompt is printed. (You can use C<my> variables in a multi-line block or to isolate values within a single command line, of course). NOTE: pdl2 preserves lexical scope between lines. =item * Execution is immediate Under most circumstances, as soon as you end a line of input the line is parsed and executed. This breaks Perl's normal dependence on semicolons as command delimiters. For example, the two-line expression print "Hello ", "world"; prints the phrase C<Hello world> in Perl, but (under most circumstances) C<Hello > in B<perldl>. =item * Multi-line execution In multiline mode (which is enabled by default, see B<Shell variables>, below), B<perldl> searches for searches for block-like constructs with curly braces, parentheses, quotes, and related delimiters. If you leave such a construct open, B<perldl> accepts more lines of input until you close the construct or explictly end the multi-line expression with ^D. Following the example above, the phrase { print "Hello ", "world"; } will print "Hello world" from either Perl or (in multi-line mode) B<perldl>. B<Warning>: The multi-line parsing uses Damian Conway's L<Text::Balanced> module, which contains some flaws -- so it can be fooled by quote-like operators such as C<q/.../>, included POD documentation, multi-line C<E<lt>E<lt>> quotes, and some particularly bizarre-but-valid C<m/.../> matches and C<s/.../.../> substitutions. In such cases, use ^D to close out the multi-line construct and force compilation-and-execution. =back If you want to preserve this behavior in a script (for example to replay a command journal file; see below on how to create one), you can use B<pdl> instead of B<perl> as the interpreter in the script's initial shebang line. =head2 Terminating C<perldl> A C<perldl> session can be terminated with any of the commands C<quit>, C<exit> or the shorthands C<x> or C<q>. If EOF handling is switched on (the default) you can also type ^D at the command prompt. If the command input is NOT a terminal (for example if you are running from a command journal file), then EOF will always terminate B<perldl>. =head2 Terminating commands (Ctrl-C handling) Commands executed within C<perldl> can be terminated prematurely using C<Ctrl-C> (or whichever key sequence sends an INT signal to the process on your terminal). Provided your PDL code does not ignore C<sigint>s this should throw you back at the C<perldl> command prompt: pdl> $result = start_lengthy_computation() <Ctrl-C> Ctrl-C detected pdl> =head2 Shortcuts and aliases =over =item * The shell aliases C<p> to be a convenient short form of C<print>, e.g. pdl> p ones 5,3 [ [1 1 1 1 1] [1 1 1 1 1] [1 1 1 1 1] ] =item * C<q> and C<x> are short-hand for C<quit>. =item * C<l> lists the history buffer pdl> l # list last 20 commands pdl> l 40 # list last 40 commands =item * C<?> is an alias for L<help|PDL::Doc::Perldl/help> pdl> ? pdl2 # get help for new pdl2 shell =item * C<??> is an alias for L<apropos|PDL::Doc::Perldl/apropos> pdl> ?? PDL::Doc =item * L<help|PDL::Doc::Perldl/help>, L<apropos|PDL::Doc::Perldl/apropos>, L<usage|PDL::Doc::Perldl/usage> and L<sig|PDL::Doc::Perldl/sig>: all words after these commands are used verbatim and not evaluated by perl. So you can write, e.g., pdl> help help instead of pdl> help 'help' =back =head2 Command-line options B<perldl> and B<pdl> support several command-line options to adjust the behavior of the session. Most of them are equivalent to commands that can be entered at the B<pdlE<gt>> prompt. They are: =over 4 =item -glut Load OpenGL when starting the shell (the perl OpenGL module, which is available from CPAN must be installed). This enables readline event loop processing. Don't use with -tk. =item -tk Load Tk when starting the shell (the perl Tk module, which is available from CPAN must be installed). This enables readline event loop processing. Don't use with -glut. =item -f file Loads the file before processing any user input. Any errors during the execution of the file are fatal. =item -w Runs with warning messages (i.e. the normal perl C<-w> warnings) turned-on. =item -M module Loads the module before processing any user input. Compare corresponding C<perl> switch. =item -m module Unloads the module before processing any user input. =item -I directory Adds directory to the include path. (i.e. the @INC array) Compare corresponding C<perl> switch. =item -V Prints a summary of PDL config. This information should be included with any PDL bug report. Compare corresponding C<perl> switch. =back =head2 The startup file F<~/.perldlrc> If the file F<~/.perldlrc> is found it is sourced at start-up to load default modules, set shell variables, etc. If it is NOT found the distribution file F<PDL/default.perldlrc> is read instead. This loads various modules considered useful by default, and which ensure compatibility with v1.11. If you don't like this and want a more streamlined set of your own favourite modules simple create your own F<~/.perldlrc>. You may wish to start from the existing F<PDL/default.perldlrc> as a template since it will not be sourced once you replace it with your own version. To set even more local defaults the file F<local.perldlrc> (in the current directory) is sourced if found. This lets you load modules and define subroutines for the project in the current directory. The name is chosen specfically because it was found hidden files were NOT wanted in these circumstances. The startup file should normally include "use PDL::AutoLoader;", as many of the nicer interactive features won't work without it. =head2 Shell variables Shell variables: (I<Note>: if you don't like the defaults change them in F<~/.perldlrc>) =over =item * $PERLDL::ESCAPE - default value '#' Any line starting with this character is treated as a shell escape. The default value is chosen because it escapes the code from the standard perl interpreter. =item * $PERLDL::HISTFILESIZE - default value 500 This is the number of lines of perldl shell command history to keep. =item * $PERLDL::PAGER - default value C<more> External program to filter the output of commands. Using C<more> prints output one screenful at a time. On Unix, setting C<page(1)> and $PERLDL::PAGER to C<tee -a outfile> will keep a record of the output generated by subsequent perldl commands (without paging). =item * $PERLDL::PROMPT - default value 'pdl> ' Enough said But can also be set to a subroutine reference, e.g. $PERLDL::PROMPT = sub {join(':',(gmtime)[2,1,0]).'> '} puts the current time into the prompt. =item * $PERLDL::MULTI - default value 1 If this is set to a true value, then perldl will parse multi-line perl blocks: your input will not be executed until you finish a line with no outstanding group operators (such as quotes, blocks, parenthesis, or brackets) still active. Continuation lines have a different prompt that shows you what delimiters are still active. Note that this is not (yet!) a complete perl parser. In particular, Text::Balanced appears to be able to ignore quoting operatores like C<q/ ... /> within a line, but not to be able to extend them across lines. Likewise, there is no support for the '<<' operator. Multiline conventional strings and {}, [], and () groupings are well supported. =item * $PERLDL::NO_EOF - default value 0 / 1 on MSWin32 Protects against accidental use of "^D" from the terminal. If this is set to a true value, then you can't accidentally exit perldl by typing "^D". If you set it to a value larger than 1 (and PERLDL::MULTI is set), then you can't use "^D" to exit multiline commands either. If you're piping commands in from a file or pipe, this variable has no effect. =item * $HOME The user's home directory =item * $PERLDL::TERM This is the Term::ReadLine object associated with the perldl shell. It can be used by routines called from perldl if your command is interactive. =item * $PDL::toolongtoprint The maximal size pdls to print (defaults to 10,000 elements). This is not just a C<perldl> or C<pdl2> variable but it is something that is usually needed in an interactive debugging session. =back =head2 Executing scripts from the C<perldl> prompt A useful idiom for developing perldl scripts or editing functions on-line is pdl> # emacs script & -- add perldl code to script and save the file pdl> do 'script' -- substitute your favourite window-based editor for 'emacs' (you may also need to change the '&' on non-Unix systems). Running "do 'script'" again updates any variables and function definitions from the current version of 'script'. =head2 Executing perldl scripts from the command line PDL scripts are just perl scripts that happen to use PDL (and possibly PDL::NiceSlice). But for the truly lazy, perldl can be invokes as a script interpreter. Because perldl is itself an interpreted perl script, most unices won't allow you to say "#!/usr/bin/perldl" at the top of your script. Instead, say "#!/usr/bin/pdl" and your script will be executed exactly as if you typed it, line-by-line, into the perldl shell. =head2 Command preprocessing NOTE: This feature is used by default by L<PDL::NiceSlice|PDL::NiceSlice>. See below for more about slicing at the C<perldl> prompt In some cases, it is convenient to process commands before they are sent to perl for execution. For example, this is the case where the shell is being presented to people unfamiliar with perl but who wish to take advantage of commands added locally (eg by automatically quoting arguments to certain commands). *I<NOTE>*: The preprocessing interface has changed from earlier versions! The old way using C<$PERLDL::PREPROCESS> will still work but is strongly deprecated and might go away in the future. You can enable preprocessing by registering a filter with the C<preproc_add> function. C<preproc_add> takes one argument which is the filter to be installed. A filter is a Perl code reference (usually set in a local configuration file) that will be called, with the current command string as argument, just prior to the string being executed by the shell. The modified string should be returned. Note that you can make C<perldl> completely unusable if you fail to return the modified string; quitting is then your only option. Filters can be removed from the preprocessing pipeline by calling C<preproc_del> with the filter to be removed as argument. To find out if a filter is currently installed in the preprocessing pipeline use C<preproc_registered>: pdl> preproc_add $myfilter unless preproc_registered $myfilter; Previous versions of C<perldl> used the variable C<$PERLDL::PREPROCESS>. This will still work but should be avoided. Please change your scripts to use the C<preproc_add> etc functions. The following code would check for a call to function 'mysub' and bracket arguments with qw. $filter = preproc_add sub { my $str = shift; $str =~ s/^\s+//; # Strip leading space if ($str =~ /^mysub/) { my ($command, $arguments) = split(/\s+/,$str, 2); $str = "$command qw( $arguments )" if (defined $arguments && $arguments !~ /^qw/); }; # Return the input string, modified as required return $str; }; This would convert: pdl> mysub arg1 arg2 to pdl> mysub qw( arg1 arg2 ) which Perl will understand as a list. Obviously, a little more effort is required to check for cases where the caller has supplied a normal list (and so does not require automatic quoting) or variable interpolation is required. You can remove this preprocessor using the C<preproc_del> function which takes one argument (the filter to be removed, it must be the same coderef that was returned from a previous C<preproc_add> call): pdl> preproc_del $filter; An example of actual usage can be found in the C<perldl> script. Look at the function C<trans> to see how the niceslicing preprocessor is enabled/disabled. =head2 C<perldl> and L<PDL::NiceSlice|PDL::NiceSlice> L<PDL::NiceSlice|PDL::NiceSlice> introduces a more convenient slicing syntax for piddles. In current versions of C<perldl> and C<pdl2> niceslicing is enabled by default (if the required CPAN modules are installed on your machine). At startup C<perldl> will let you know if niceslicing is enabled. The startup message will contain info to this end, something like this: perlDL shell v1.XX PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file 'COPYING' in the PDL distribution. This is free software and you are welcome to redistribute it under certain conditions, see the same file for details. ReadLines, NiceSlice enabled Reading /home/csoelle/.perldlrc... Type 'demo' for online demos Loaded PDL v2.XX When you get such a message that indicates C<NiceSlice> is enabled you can use the enhanced slicing syntax: pdl> $a = sequence 10; pdl> p $a(3:8:2) For details consult L<PDL::NiceSlice>. L<PDL::NiceSlice|PDL::NiceSlice> installs a filter in the preprocessing pipeline (see above) to enable the enhanced slicing syntax. You can use a few commands in the C<perldl> shell to switch this preprocessing on or off and also explicitly check the substitutions that the NiceSlice filter makes. You can switch the L<PDL::NiceSlice|PDL::NiceSlice> filter on and off by typing pdl> trans # switch niceslicing on and pdl> notrans # switch niceslicing off respectively. The filter is on by default. To see how your commands are translated switch reporting on: pdl> report 1; pdl> p $a(3:8:2) processed p $a->nslice([3,8,2]) [3 5 7] Similarly, switch reporting off as needed pdl> report 0; pdl> p $a(3:8:2) [3 5 7] Reporting is off by default. =head2 Automatically execute your own hooks The variable @PERLDL::AUTO is a simple list of perl code strings and/or code reference. It is used to define code to be executed automatically every time the user enters a new line. A simple example would be to print the time of each command: pdl> push @PERLDL::AUTO,'print scalar(gmtime),"\n"' pdl> print zeroes(3,3) Sun May 3 04:49:05 1998 [ [0 0 0] [0 0 0] [0 0 0] ] pdl> print "Boo" Sun May 3 04:49:18 1998 Boo pdl> Or to make sure any changes in the file 'local.perldlrc' are always picked up :- pdl> push @PERLDL::AUTO,"do 'local.perldlrc'" This code can of course be put *in* 'local.perldlrc', but be careful :-) [Hint: add C<unless ($started++)> to above to ensure it only gets done once!] Another example application is as a hook for Autoloaders (e.g. PDL::AutoLoader) to add code too which allows them to automatically re-scan their files for changes. This is extremely convenient at the interactive command line. Since this hook is only in the shell it imposes no inefficiency on PDL scripts. Finally note this is a very powerful facility - which means it should be used with caution! =cut
Close