Question: I am using this one liner in `prepare-commit-msg` hook to prepend the commit message with a custom string:

```
echo "text " | cat - $COMMIT_MSG_FILE > /tmp/out && mv /tmp/out $COMMIT_MSG_FILE

```

Unfortunately, every commit message contins "text" followed by CRLF and the rest of the commit message on the next line. For example, if commit message is: `"Commit 123"`, the new commit message would be 

```
"text
Commit 123"

```

and not `"textCommit 123"`, which is what I want.

Any idea what I am missing?

Answer: 
```
kubectl get pods --all-namespaces -lapp=myapp | grep Evicted | awk {'print $1'} | uniq -c

```

should do the trick for you. Uniq wasn't having an effect because of non-unique pod names.
I would like to suggest you a different approach using kubectl command arguments: 

```
$ kubectl get pods --all-namespaces --field-selector=status.phase=Evicted --sort-by=.metadata.namespace -o custom-columns=NAMESPACE:.metadata.namespace | uniq

```

Here we are using some arguments to filter, sort and define custom columns output. 

The output will be similar to this: 

```
NAMESPACE
customer-1
customer-2
customer-3

```