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

Thread: Shell Scripting

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2018
    Location
    Italy, Bologna
    Posts
    11

    Shell Scripting


    Hi,
    I would like to make a script and run it directly passing it the variable (file) that it needs. Example: count the lines of the file - instead of waiting for the variable entered from the keyboard - READ $ VAR - I would like to pass it to the script directly from the shell.

    It's possible?
    thanks

  2. #2
    Quote Originally Posted by paiale View Post
    Hi,
    I would like to make a script and run it directly passing it the variable (file) that it needs. Example: count the lines of the file - instead of waiting for the variable entered from the keyboard - READ $ VAR - I would like to pass it to the script directly from the shell.

    It's possible?
    thanks
    yea, real possible. why dont you go ahead and do it, since you can find thousands of bash tutorials with a google search. come back if you get stuck, because we're not going to write it for you.

  3. #3
    Linux Guru
    Join Date
    Dec 2013
    Posts
    2,747
    Quote Originally Posted by paiale View Post
    Hi,
    I would like to make a script and run it directly passing it the variable (file) that it needs. Example: count the lines of the file - instead of waiting for the variable entered from the keyboard - READ $ VAR - I would like to pass it to the script directly from the shell.

    It's possible?
    thanks
    yes, this is perfectly possible!

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Mar 2018
    Location
    Italy, Bologna
    Posts
    11

    ....

    Quote Originally Posted by habit View Post
    yea, real possible. why dont you go ahead and do it, since you can find thousands of bash tutorials with a google search. come back if you get stuck, because we're not going to write it for you.

    thanks ... a small example was enough. I can read the manuals, if I wrote here it was simply for a tip on where and how to find information. .... I realize that the forums are now only for an expert level. Thank you all

  6. #5
    Quote Originally Posted by paiale View Post
    thanks ... a small example was enough. I can read the manuals, if I wrote here it was simply for a tip on where and how to find information. .... I realize that the forums are now only for an expert level. Thank you all
    'expert level" no. but c'mon...putting 'bash scripting tutorial" into google pulls up a gazillion hits with examples. if you found this site with a google search you can find that and if you cant figure that out you sure wont be able to write a script.

  7. #6
    Linux Newbie CarterCox's Avatar
    Join Date
    Dec 2017
    Location
    Argentina
    Posts
    247
    Quote Originally Posted by paiale View Post
    thanks ... a small example was enough. I can read the manuals, if I wrote here it was simply for a tip on where and how to find information. .... I realize that the forums are now only for an expert level. Thank you all


    Not every forum. Just this one. Since July 14 2016.

    Sent from my Moto G Play using Tapatalk
    "My common sense is tingling."

  8. #7
    Quote Originally Posted by CarterCox View Post
    Not every forum. Just this one. Since July 14 2016.
    so wheres your expert guidance then? oh thats right...you dont know how to script use the cli or do anything without a gui and your $4 walmart phone. want to help him then step up. otherwise shut up.

  9. #8
    Linux Newbie CarterCox's Avatar
    Join Date
    Dec 2017
    Location
    Argentina
    Posts
    247
    Dude are you nuts? I don't buy phones at Walmart. I'm surprised you even know such a mainstream company. Is it like a bad word for the likes of you? I wonder which obscure shops you go to buy your obscure phones. Do you even have a phone? Or are you scared Google will listen to you? Please tell me you are.

    Ok I'll help: Yes you can.

    Done. See how I did it? Without insults and sarcasm? Now you try it.

    Sent from my Moto G Play using Tapatalk
    "My common sense is tingling."

  10. #9
    Quote Originally Posted by CarterCox View Post
    Dude are you nuts? I don't buy phones at Walmart. I'm surprised you even know such a mainstream company. Is it like a bad word for the likes of you? I wonder which obscure shops you go to buy your obscure phones. Do you even have a phone? Or are you scared Google will listen to you? Please tell me you are.
    a moto g? huh..one of the first hits in google for it is from walmart.
    Ok I'll help: Yes you can. Done. See how I did it? Without insults and sarcasm? Now you try it.
    you 'helped" by saying yes? wow..how about any scripting, since thats what the op asked for (and didn't look up). thats right...you dont script. or do much of anything, really.

    run along dipshit.

  11. #10
    Linux Newbie CarterCox's Avatar
    Join Date
    Dec 2017
    Location
    Argentina
    Posts
    247
    Quote Originally Posted by habit View Post
    a moto g? huh..one of the first hits in google for it is from walmart.
    Does that mean I buy them there?? Hey they sell bananas in South Africa. Does that mean I buy them there as well?
    Quote Originally Posted by habit View Post
    you 'helped" by saying yes? wow..how about any scripting, since thats what the op asked for (and didn't look up). thats right...you dont script. or do much of anything, really.
    False. Read again.
    Quote Originally Posted by habit View Post
    run along dipshit.
    #Crying

    Sent from my Moto G Play using Tapatalk
    "My common sense is tingling."

Posting Permissions

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