나는 fqdn과 hostname의 변수를 포함하는 텍스트 파일을 가지고있다. 파일 내가 bash는 스크립트에서 컬을 사용하여 일부 데이터를 업데이트해야이파일에서 컬 명령 데이터를 사용하는 방법?
first_fqnd first_hostname
second_fqdn second_hostname
..... .....
처럼 보이지만 나는이 텍스트 파일에서 FQDN 및 호스트 이름을 가지고 모든 쌍의 FQDN 및 호스트 이름의 컬을해야한다.
내 컬은 다음과 같이해야합니다 :
curl -H "Content-Type:application/json" -XPUT "https://pup.pnet.pl/api/hosts/**fqdn from file**" -d '{"host":{"name": "**hostname from file**"}}' --cacert bundle.pem --cert xxx-pem.cer --key xxx-privkey.pem
가 어떻게 말릴 파일에서 이러한 변수를 전달할 수 있습니다
? 나는 AWK 사용에 대한 생각했지만, 나는
do 다음에 백 슬래시가 필요하지 않습니다. – Barmar
@Barmar oops..typo..fixed .. – heemayl