https://github.com/anhsirk0/exqt
simple code runner script
https://github.com/anhsirk0/exqt
Last synced: about 1 month ago
JSON representation
simple code runner script
- Host: GitHub
- URL: https://github.com/anhsirk0/exqt
- Owner: anhsirk0
- Created: 2024-09-01T06:36:12.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-09-09T00:39:16.000Z (9 months ago)
- Last Synced: 2025-03-31T06:22:29.353Z (3 months ago)
- Language: Perl
- Size: 2.93 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* EXQT - simple code runner script
+ Git repo on Codeberg:
- Mirrors:
+ GitHub:* Installation
Its just a perl script
download it make it executable and put somewhere in your $PATH
** Downloading the script
#+BEGIN_SRC shell
curl https://codeberg.org/anhsirk0/exqt/raw/branch/main/exqt.pl --output exqt
#+END_SRC
** Making it executable
#+BEGIN_SRC shell
chmod +x exqt
#+END_SRC
** Copying it to $PATH
#+BEGIN_SRC shell
cp exqt ~/.local/bin/
#+END_SRC
* Usage
#+BEGIN_SRC shell
exqt
#+END_SRC
* Examples
test.c
#+BEGIN_SRC c
#includeint main(int argc, char **argv) {
printf("Number of args: %d\n", argc);
for (int i = 0; i < argc; i++) {
printf("arg %d: %s\n", i, argv[i]);
}
return 0;
}
#+END_SRC
running it with =exqt=
#+BEGIN_SRC text
$ exqt test.c arg1 arg2 arg3
Number of args: 4
arg 0: ./exqt_test.out
arg 1: arg1
arg 2: arg2
arg 3: arg3
#+END_SRCPython Example
test.py
#+BEGIN_SRC python
import sys
print(sys.argv)
#+END_SRC
#+BEGIN_SRC text
$ exqt test.py arg1 arg2 arg3
['test.py', 'arg1', 'arg2', 'arg3']
#+END_SRC