8 Answered Questions for the topic Scripting

07/05/19

How to count lines in a document?

I have lines like these, and I want to know how many lines I actually have... 09:16:39 AM all 2.00 0.00 4.00 0.00 0.00 0.00 0.00 0.00 94.00 09:16:40 AM all 5.00 0.00 0.00 4.00 0.00 0.00 0.00... more

06/26/19

How do I know the script file name in a Bash script?

How can I determine the name of the Bash script file inside the script itself? Like if my script is in file `runme.sh`, then how would I make it to display "You are running runme.sh" message... more

06/04/19

Why do you need to put #!/bin/bash at the beginning of a script file?

I have made [Bash][1] scripts before and they all ran fine without this at the beginning. What's the point of putting it in? Would things be any different? Also, how do you pronounce `#`? I know... more

05/06/19

How do I prompt for Yes/No/Cancel input in a Linux shell script?

I want to pause input in a shell script, and prompt the user for choices. The standard 'Yes, No, or Cancel' type question. How do I accomplish this in a typical bash prompt?

05/04/19

How do I know the script file name in a Bash script?

How can I determine the name of the Bash script file inside the script itself? Like if my script is in file `runme.sh`, then how would I make it to display "You are running runme.sh" message... more

04/27/19

How do I get cURL to not show the progress bar?

I'm trying to use cURL in a script and get it to ***not*** show the progress bar. I've tried the `-s`, `-silent`, `-S`, and `-quiet` options, but none of them work. Here's a typical command I've... more

04/25/19

How does "cat << EOF" work in bash?

I needed to write a script to enter multi-line input to a program (`psql`). After a bit of googling, I found the following syntax works: cat << EOF | psql ---params BEGIN; `pg_dump... more

03/26/19

How do I get cURL to not show the progress bar?

I'm trying to use cURL in a script and get it to ***not*** show the progress bar. I've tried the `-s`, `-silent`, `-S`, and `-quiet` options, but none of them work. Here's a typical command I've... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.