Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Run multiple commands in single cmd terminal?

Explorer ,
Sep 12, 2022 Sep 12, 2022

Hello. I know that by using app.system(), you can run a command in a terminal, but that terminal closes after the command executes. How can I run multiple commands in the same terminal?

TOPICS
Actions and scripting , SDK , Windows
391
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
LEGEND ,
Sep 12, 2022 Sep 12, 2022

You simply string together the relevant commands when you call the command window. Generally, though, it's better to combine complex system commands in shell scripts/ batch files.

 

Mylenium

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 12, 2022 Sep 12, 2022

For example, I have this string of commands: wsl & cd /mnt/c/Users/DELL/Documents/Quixel/multi_grabcut & python main.py --image data/a.png --scribbles data/s.png --output data/output.png --resolve_type pixel

 

However, running them using app.system() in a single line does not work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2022 Sep 13, 2022

It should work in a single line with a semi-colon between the commands, I'd have thought. If not, just write a shell script.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 14, 2022 Sep 14, 2022
LATEST

TheAzzam_0-1663222684229.pngexpand image

The shell script also does not execute multiple commands. Maybe it's the first command "wsl" that's the issue.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines