# Command for OS that calls racket etc

**URL:** <https://racket.discourse.group/t/command-for-os-that-calls-racket-etc/3533>\
**Category:** General\
**Created:** [February 1, 2025, 6:54pm UTC](https://racket.discourse.group/t/command-for-os-that-calls-racket-etc/3533 "2025-02-01T18:54:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Don](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@Don](https://racket.discourse.group/u/Don)\
**Post date:** [February 1, 2025, 6:54pm UTC](https://racket.discourse.group/t/command-for-os-that-calls-racket-etc/3533/1 "2025-02-01T18:54:16Z")

</div>

I can run a launcher that runs drracket and loads a file.  
Trying to setup a launcher that runs Racket, loads a file containing a module and calls the module. Something like following which does not work:  
drracket -l file.rkt '(run-my-module)'  
or  
racket -l file.rkt '(run-my-module)'

Thanks  
Don Green

---

<div class="post-metadata">

**Author:** ![damien\_mattei](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/damien_mattei/32/2706_2.png) [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Post date:** [February 1, 2025, 7:37pm UTC](https://racket.discourse.group/t/command-for-os-that-calls-racket-etc/3533/2 "2025-02-01T19:37:37Z")

</div>

file.rkt:

```scheme
#! /usr/bin/env racket

(module yourmodule racket
	
;; module code here

)

```

make it executable:

```scheme
chmod u+x file.rkt

```

run it:

```scheme
./file.rkt

```

but i'm not sure this is what you want....

---

<div class="post-metadata">

**Author:** ![shhyou](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@shhyou](https://racket.discourse.group/u/shhyou)\
**Post date:** [February 1, 2025, 9:01pm UTC](https://racket.discourse.group/t/command-for-os-that-calls-racket-etc/3533/3 "2025-02-01T21:01:32Z")

</div>

`-l` only works for things like `x/y/z`, e.g. `raco/main`, and `-t` necessarily calls the `main` submodule if it exists. So I think the only option is

```scheme
racket -e '(require (submod "XYZ.rkt" YOUR-SUBMOD))'

```

or

```scheme
racket -e '(require (submod (file "~/dir/XYZ.rkt") YOUR-SUBMOD))'

```

For example, this one manually runs the `test` submodule:

```scheme
racket -e '(require (submod "mycode.rkt" test))'

```
