0

Whenever I try to run this command in windows terminal. I get a

'\' is not recognized as an internal or external command, operable program or batch file.

git rev-list --all --objects | \
    sed -n $(git rev-list --objects --all | \
    cut -f1 -d' ' | \
    git cat-file --batch-check | \
    grep blob | \
    sort -n -k 3 | \
    tail -n40 | \
    while read hash type size; do 
         echo -n "-e s/$hash/$size/p ";
    done) | \
    sort -n -k1

ruohola
  • 16,015
  • 6
  • 33
  • 67
TheBAST
  • 2,280
  • 7
  • 26
  • 53

1 Answers1

1

These commands are intended to be given to a POSIX shell, not the Windows command prompt.

The way you have pasted the instructions into the command prompt, the \ character is interpreted as a command. Neither does such a command exist nor is the character intended to be interpreted as a command (it is actually used to tell the POSIX shell that the command continues on the next line).

j6t
  • 4,718
  • 1
  • 5
  • 18