Answer the question
In order to leave comments, you need to log in
How to create custom command in linux with argument?
I want to create my own command for compiling and then running a c++ program.
Now it consists of two steps:
$g++ program.cpp -o program //compile
$./program //run
I tried to create with alias but no success
$alias compile='g++ $?.cpp -o $? ';'./$?'
And I would like to just enter the compile <file name> command and not take a steam bath.
Answer the question
In order to leave comments, you need to log in
See operators || && they provide either another operation or a serial
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question