TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Here-Doc Headache

3 点作者 nalgeon10 个月前

1 comment

djha-skin10 个月前
The author does acrobatics with sourcing the temporary file and then backslashing the dollar in the heredoc when all he needed to do was backslash The dollar in the in the first place. The author shows a new script with double quotes instead of a heredoc that would lead to the exact same result. He starts with `export AUTH_TOKEN=$APP_AUTH_TOKEN` but then later he said he was working with `export AUTH_TOKEN=$AUTH_TOKEN`.<p>Heredocs work fine. If the author had written this originally and `$APP_AUTH_TOKEN` we&#x27;re indeed set on the originating machine, then the original heredoc would work just fine.<p>This whole article leaves me feeling very confused.