What is the meaning of this command line

g++ -fsanitize=address -std=c++17 -Wall -Wextra -Wshadow -DONPC -O2 -o %< % && ./%< < inp

Especially last part with bizzare symbol sequence

Line was taken from some .vimrc file i wanted to copy

Answer

Lets break it down:

g++ = Your compiler

-fsanitize=address = Compiler flags which adds address sanitizing. Increasing memory usage but also useful for debugging memory issues.

-std=c++17 = Your C++ standard

-Wall -Wextra -Wshadow = Your compiler error flags

-DONPC = A compilation define for ONPC

-O2 = A mild optimization flag

-o = The name of your compiled output-file

%< = In vim this stands for the main part of your filename

% = In vim this stands for your full filename, which you are compiling

&& = Indicating a second command

./%< = Run the output-file you just created

< inp = With this as input

I hope this clears things up. For further information, I’d recommend reading up on the vim and g++ documentation. Maybe even on bash && You can find all this information in there.