Thread: Shell Script.
View Single Post
  #5   (View Single Post)  
Old 11th July 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Default

Quote:
Originally Posted by Carpetsmoker View Post
Maybe using an alias is simpler/faster, for example:

% alias mp 'mplayer -playlist r1live.ram'
I dont think it would be faster because everytime you start a new shell session, the shell have to read through the startup script file (perhaps alias file as well) again

Quote:
Originally Posted by ocicat View Post
  • Place the following into a file:
    Code:
    #!/bin/sh
    
    mplayer -playlist r1live.ram
    Assume the filename is playlist. Also note that "#!/bin/sh" must begin on line 1, column 1.
  • Add executable rights to the file:

    $ chmod +x playlist
You can just put

mplayer -playlist r1live.ram

into the file playlist and do

bash/sh playlist

Im sure you recognize it raises a fairly serious security issue here
Reply With Quote