Find the answer to your Linux question:
Results 1 to 3 of 3
ok so the issue i have is i need to over simplify a command for my friend to execute when he is on my server what i need to do ...
  1. #1
    Just Joined!
    Join Date
    Jun 2004
    Posts
    7

    executing files from another file

    ok so the issue i have is i need to over simplify a command for my friend to execute when he is on my server
    what i need to do is have him enter a very simple command like ./name and it will execute a file called ./name.pl --option --option
    and i need to make several of these so he can enter
    ./name1
    ./name2
    ./name3
    and execute the correct file with the preset options
    i know this may seem to be a bit over simplifing for dumb people but thats what i was asked to do
    so if anyone can tell me where to look for the information i need to make this happen i would be greatly apreciated

    and a side note it would be even more convenient if it was posible to change them without too much dificulty like if i could just vim the new file and change 1 of the options or something

    thanks

  2. #2
    Linux Guru Juan Pablo's Avatar
    Join Date
    Mar 2006
    Location
    /home/south_america/ecuador/quito
    Posts
    2,064
    Try with a BASH script:

    Just put the command in a text file, save it with the name your friend wants to execute, make it executable and ... done!

    Example
    Code:
    #!/bin/bash
    
    #The command to launch 
    cp -RPp --progress file1 folder1
    It is totally interpreted so changing the file is as editing any other file
    Put your hand in an oven for a minute and it will be like an hour, sit beside a beautiful woman for an hour and it will be like a minute, that is relativity. --Albert Einstein
    Linux User #425940

    Don't PM me with questions, instead post in the forums

  3. #3
    Just Joined!
    Join Date
    Jun 2004
    Posts
    7
    ok thanks so much that completly solved my problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •