Find the answer to your Linux question:
Results 1 to 2 of 2
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: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    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
    Linux Newbie
    Join Date
    Mar 2010
    Posts
    152
    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
  •