Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: Bash Code

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Bash Code


    Hey everyone, I'm new at this but i have a coding problem.

    read -p "Enter Commands sperated by commas" cmds
    echo "$cmds" | tr ',' '\n'

    so user enters in:
    ls,date
    echo displays:
    ls
    date

    NOW, is there a way to now run those Commands in the same script?

    THANKS for any help.

  2. #2
    Quote Originally Posted by Venafro89 View Post
    NOW, is there a way to now run those Commands in the same script?
    What do you mean by this? Taken at face value, your question is trivial - just put them in the same script and you've put them in the same script.

    What problem are you really having?

Posting Permissions

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