Question: I just got started writing some C programs.

To start with I was just running them through VS code. Nice and easy, I just had to press a button and bam, there it was.

But now I need to pass files as arguments to my program, which creates the need of running it from the command line.

The way I do it now, is using this two step process, (which I think is just the basic way of doing it):

```
ask@Garsy:~/Notes/ethHack/crpytifiles$ gcc test.c -o test

```

and then running the file:

```
ask@Garsy:~/Notes/ethHack/crpytifiles$ ./test 

```

This is a bit tedious in the long run. Is there any way I could do this process in one step?

And perhaps also without creating the executable?

It would be really cool if I could just run it as you normally would with a python or java file, one command, and the thing runs.

Answer: 
You could do that with a **makefile**. More about **GNU Make** [here](https://www.gnu.org/software/make/).

```
all:
  gcc test.c -o test
  ./test

```

The file should be called **Makefile** or **makefile** *(it can have different names,just keeping it simple)*, and you can run it by executing:

`make`

Assuming you have `GNU Make` installed and `test.c` is located in the same directory with `makefile`.
I am wondering that nobody is issuing the general comparison between an IDE and shell. So yes IDE may give you some comfort. But you will be happy if you learnt the fundamentals of linking & Co from scratch - otherwise the configuration of the
IDE can get pretty challenging, when you start stuff that does not work out of the box.

The rest are helpful tips to increase the efficiency on the shell - like make or
other automation builders. Shell editors provide additional tools and plugins to increase your workflow - eg with vim as an shell editor (and some plugins) you come pretty close to an IDE. This includes syntax highlight,
code check, compile and run of the program, etc... just my 2 cents