0

I am new to Mac Terminal. I am learning. After entering a command it gives me just that: > What does it mean? What should I do now, how to continue or scape?

Here is the command I issued:

for file in *.txt; do echo mv "$file" "${file/#new/nou}”; done
  • Can you copy/paste the relevant part (the command you typed and the output) into the question? – nohillside Jan 24 '17 at 12:48
  • @patrix: I try to learn how to change the name of many files. Just to test I tried: for file in *.txt; do echo mv "$file" "${file/#new/nou}”; done In this case I want to change a file name new-file.txt for nou-file.txt – segon Jan 24 '17 at 12:53
  • Please click on edit below the text of your question and copy/paste the relevant part, as you've typed it, directly from Terminal into the text of the question to make sure we look at the same problem as you do. – nohillside Jan 24 '17 at 12:55
  • It looks like the last quote may be "smart" when it should be straight. Did I see another question about that here somewhere? – Tom Gewecke Jan 24 '17 at 13:05
  • @Allan The quotes take care of the hash. But as Tom points out the last quote is wrong (assuming the OP copied from Terminal into the comment they wrote). – nohillside Jan 24 '17 at 13:09
4

In your case, the problem is you are inputing a character in your command after nou} (note, not a " but a ) .

The command should look like this:

for file in *.txt; do echo mv "$file" "${file/#new/nou}"; done

To break out of any ongoing command just press Ctrl+C.

1

It means that you've entered something that leads the shell to believe the command is not complete, and you need to enter more text. A "\" character is most likely. Either finish your command or use Ctrl-C to break out of it.

  • 1
    It looks like the last quote may be "smart" when it should be straight. Did I see another question about that here somewhere? – Tom Gewecke Jan 24 '17 at 13:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .