크론탭 명령어의 퍼센트 기호
dev | 2025-01-11
The "sixth" field (the rest of the line) specifies the command to be run. The entire command portion of the line, up to a newline or % character, will be executed by /bin/sh or by the shell specified in the SHELL variable of the cronfile. Percent-signs (%) in the command, unless escaped with backslash (\), will be changed into newline characters, and all data after the first % will be sent to the command as standard input.
ref.
crontab(5)
크론탭(crontab
) 등록할 때 명령어에 있는 퍼센트(%
) 기호는 개행으로 변경되고 이후 부분은 스탠다드 인풋으로 전달되기 때문에 퍼센트 기호를 백슬래시(\
)로 이스케이프 해줘야 한다.
Comments