Run a string as a command within a Bash script

前端 未结 8 936
清歌不尽
清歌不尽 2020-12-07 09:08

I have a Bash script that builds a string to run as a command

Script:

#! /bin/bash

matchdir=\"/home/joao/robocup/runner_workdir/mat         


        
8条回答
  •  暖寄归人
    2020-12-07 09:55

    Here is my gradle build script that executes strings stored in heredocs:

    current_directory=$( realpath "." )
    GENERATED=${current_directory}/"GENERATED"
    build_gradle=$( realpath build.gradle )
    
    ## touch because .gitignore ignores this folder:
    touch $GENERATED
    
    COPY_BUILD_FILE=$( cat <

    The lone ")" are kind of ugly. But I have no clue how to fix that asthetic aspect.

提交回复
热议问题