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

Run multiple commands in single cmd terminal?

Explorer ,
Sep 12, 2022 Sep 12, 2022

Copy link to clipboard

Copied

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

Views

216

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

TheAzzam_0-1663222684229.png

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

Votes

Translate

Translate

Report

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