Why cygwin's history output is prefixed by two spaces?

Andrey Repin anrdaemon@yandex.ru
Fri Aug 2 08:54:55 GMT 2024


Greetings, Sophoklis Goumas!

> This is because I'm trying to parse history output and I foolishly set
> FS (field separator) to be two consecutive spaces '\ \ '.

history | while read -r id cmd; do echo "$cmd"; done

> I think I'll pass this to sed first and maybe replace with an unlikely
> character to be found thereafter so these lines will be parseable or if
> it's confirmed to be a hardcoded fixed width output I'll just use column
> numbers.

> I also hope this won't get mess the threads as I thought I was
> subscribed to this mailing list so I am replying by hand and I don't
> know if the right headers will be included, so please excuse as well,
> if the threads get messed up.


-- 
With best regards,
Andrey Repin
Friday, August 2, 2024 11:37:34

Sorry for my terrible english...



More information about the Cygwin mailing list