我需要从包含一些特殊字符的shell脚本中调用URL。如何执行此操作?

时间:2018-11-29 06:46:17

标签: shell unix

我需要从包含一些特殊字符的shell脚本中调用URL,但是问题在于这些字符在shell中具有某些特殊含义,因此shell在后台发送进程。

请提出建议,谢谢……

curl localhost:8009/customer/v1/data_extract?epoch_from=15448&epoch_to=15402&limit=500&bucket=Activity&address_bus=mainDatabase&where_field=cj.journal_identity_tx.created_dt_tm.epoch_created_dt_tm

1 个答案:

答案 0 :(得分:1)

将每个&替换为%26

将每个=替换为%3d

或者使用" url "或使用单引号'

bash中,双引号和单引号的含义不同