change from julia mode to shell mode
Asked Answered
P

3

8

I am using Julia 1.4.2. my version info is,

Julia Version 1.4.2 Commit 44fa15b150* (2020-05-23 18:35 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-8.0.1 (ORCJIT, skylake)

How to change from Julia command mode to Shell mode in julia?

I want to perform os commands such as ls pwd etc.,

Porthole answered 5/7, 2020 at 8:51 Comment(0)
M
9

Use semicolon (;). You can read about different shell modes here.

Meadowlark answered 5/7, 2020 at 9:6 Comment(0)
M
4

Like the other answer say you use the semicolon ;.

Note that shell mode (contrary to the package manage mode) is not sticky - that is whenever you execute command you are back in Julia REPL. Sometimes when I want to execute many command line command a good workflow is to type ;bash (or ;cmd on Windows), do all your stuff and then come back to Julia by executing exit - this works quite well and I found it to be most convenient.

Mistrust answered 5/7, 2020 at 11:17 Comment(0)
C
2

Please note that in Windows Powershell going to shell requires the following sequence:

  1. Type: ;

This goes to Julia shell. DOS commands not working.

  1. Type: cmd Now you are in the DOS-shell

To get back to Julia:

  1. Type: exit
  2. Type: Ctrl+c (Hold down Ctrl button AND press c)
Constantia answered 19/10, 2022 at 20:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.