0

I have written the below bash script to compile and run my C programs, and added it to the 'Manage External Tools' list.

#! /bin/bash
cd /home/prm/Documents/Anubhav/C
FILE="$(ls -Art | tail -n 1)" # to get the latest updated file
gcc $FILE # compilation
./a.out # execution

With this I am able to compile and run my last saved C programs. But I am unable to send any value to the program since the output displays on 'Output Tools' of Gedit rather than on Terminal. I also tried various input options from the drop-down menu but none of them worked for me.

Screenshot of Editor with ouput

Kulfy
  • 18,154

0 Answers0