37 Answered Questions for the topic shell

06/30/19

#### ./configure : /bin/sh^M : bad interpreter?

I've been trying to install lpng142 on my fed 12 system. Seems like a problem to me. I get this error [root@localhost lpng142]# ./configure bash: ./configure: /bin/sh^M: bad interpreter: No such... more

06/28/19

05/26/19

#### Loop through an array of strings in Bash?

I want to write a script that loops through 15 strings (array possibly?) Is that possible? Something like: for databaseName in listOfNames then # Do something end

05/26/19

#### How to assign name for a screen?

I'm using the screen multiplexer tool on the command shell and open a lot of screens. I then forget which process ID associates with which task. I would like to set a name for a screen but can't... more

05/26/19

#### How can I copy the output of a command directly into my clipboard?

How can I pipe the output of a command into my clipboard and paste it back when using a terminal? For instance: cat file | clipboard

05/21/19

#### How to run a shell script on a Unix console or Mac terminal?

I know it, forget it and relearn it again. Time to write it down.

05/18/19

#### How can I reverse the order of lines in a file?

I'd like to reverse the order of lines in a text file (or stdin), preserving the contents of each line. So, i.e., starting with: foo bar baz I'd like to end up with baz bar foo Is there... 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?
1

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

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

#### OR

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