Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### less executes a script instead of displays it ###
- support@server:~$ grep ^Ubuntu /etc/motd
- Ubuntu 10.04.2 LTS
- support@server:~$ which less
- /usr/bin/less
- support@server:~$ ls -l /usr/bin/less
- lrwxrwxrwx 1 root root 9 2011-06-30 10:38 /usr/bin/less -> /bin/less
- support@server:~$ file /bin/less
- /bin/less: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
- support@server:~$ env | grep -i less
- LESS= -R
- LESSOPEN=| %s
- support@server:~$ ls -l /usr/local/bin/test.sh
- -rwxr-xr-x 1 root root 23 2011-09-13 09:24 /usr/local/bin/test.sh
- support@server:~$ file /usr/local/bin/test.sh
- /usr/local/bin/test.sh: Bourne-Again shell script text executable
- support@server:~$ cat /usr/local/bin/test.sh
- #!/bin/bash
- echo TEST
- support@server:~$ less /usr/local/bin/test.sh
- # this gives...
- ====================================
- TEST
- /usr/local/bin/test.sh (END)
- ====================================
- # It runs the script! Fatal warning! :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement