Bash中的文件中有哪些导出变量?

时间:2018-02-27 23:02:00

标签: bash

文件:camera.conf

CONFIGPATH=/system/sdcard/config
BINPATH=/system/sdcard/bin
SDPATH=/system/sdcard
PATH="/system/bin:/bin:/usr/bin:/sbin:/usr/sbin:/media/mmcblk0p2/data/bin:/media/mmcblk0p2/data/sbin:/media/mmcblk0p2/data/usr/bin"
VERSION="v0.0.5 Beta"
CONFIG_GLOBAL_VOLUME=100
CONFIG_GLOBAL_OSD_POSITION="DOWN"
CONFIG_GLOBAL_OSD_VALUE="[ Cam 1 ]  [ Dafang ]  [ %Y - %m - %d   %H : %M : %S  %Z %z  ]"
CONFIG_GLOBAL_ACCESS_USER=-1
CONFIG_GLOBAL_ACCESS_PASS=-1
CONFIG_GLOBAL_IR=0
CONFIG_GLOBAL_IR_CUT=0
CONFIG_GLOBAL_RENDER_BW=-1
CONFIG_LDR_AVG=1
CONFIG_GLOBAL_SPEAKER_GAIN=500
CONFIG_ACCESS_API=-1
CONFIG_STREAM_WIDTH=1920
CONFIG_STREAM_HEIGHT=1080
CONFIG_STREAM_NIGHTMODE=2
CONFIG_STREAM_FLIP=0
CONFIG_STREAM_ACCESS_USER="PASS"
CONFIG_STREAM_ACCESS_PASS="PASS"
CONFIG_SNAPHOT_WIDTH=1920
CONFIG_SNAPHOT_HEIGHT=1080
CONFIG_SNAPHOT_NIGHTMODE=2
CONFIG_SNAPHOT_FLIP=0
CONFIG_MOTOR_NS=100

使用示例第一个命令并返回

~$ export $(cat /system/sdcard/config/camera.conf | grep -v ^# | grep -v '^[[:space:]]*$' | sed ':a;N;$!ba;s/\n/ /g')
-sh: export: Beta": bad variable name

使用示例第二个命令并返回

export $(cat /system/sdcard/config/camera.conf | grep -v ^# | grep -v '^[[:space:]]*$' | xargs)
-sh: export: 1: bad variable name

使用示例第三个命令并返回

export $(cat /system/sdcard/config/camera.conf | grep -v ^# | grep -v '^[[:space:]]*$' | awk '{printf "%s ",$0} END {print ""}')
-sh: export: Beta": bad variable name

带有空格的导出变量""字符? 示例var:VERSION="v0.0.5 Beta"

0 个答案:

没有答案