With 

```
sort -c file

```

I received the first bad line that is unsorted as report, or nothing if the file is sorted. (And sort -c do not sort the file.)

I want to check if I received a report or not.
Something going like this :

```
if [ $(sort -c file) == *something* ]
then
    echo wasn't sorted
    sort file
    ...
else
    echo already sorted
    ...
fi

```

Is it possible, and how ?

Same question with -C instead of -c (if it's different or not with the "silent" option)...