SShortSingh.
Back to feed

Why Claude Code's shell commands fail on Macs: zsh and BSD tools explained

0
·24 views

Claude Code's Bash tool runs commands through zsh on macOS Catalina and later, despite being named and described as a Bash executor, causing subtle compatibility failures. Commands written by Claude often assume GNU tool behavior, but macOS ships with BSD versions of utilities like sed, date, and stat that interpret flags differently. A common example is 'sed -i -e', which silently creates unwanted backup files on macOS instead of editing in place, and may even exit with code 0, hiding the error from automated checks. Installing GNU tools via Homebrew does not fix the issue because Claude Code injects its own process environment — not the user's shell profile — before each command. The author identifies these as two concrete, systemic causes rather than model sloppiness, and notes that PATH modifications in shell profiles have no effect on the Bash tool's execution environment.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Benchmarking Six Inference Engines for Gemma 4 E2B on a Single Cloud TPU v5e Chip

A developer compared six inference serving engines running Gemma 4 E2B on one Cloud TPU v5e chip, including vLLM, SGLang-JAX, a pure-JAX engine, and TorchTPU variants. Each engine ran alone on an identical flex-start v5litepod-1 instance using the same chat prompts, load sweeps, and 1,319 GSM8K questions. Answer quality was broadly similar across engines, with SGLang-JAX scoring slightly ahead of vLLM. For single requests, SGLang-JAX delivered the highest throughput at about 160 tokens per second, while TorchTPU trailed significantly. Under heavy load, patched SGLang-JAX reached 4,249 tokens per second at 64 requests, about 2.5 times vLLM's throughput, though vLLM remained the engine that works with Gemma 4 E2B as shipped.

0
ProgrammingDEV Community ·

Plain-English Beginner's Guide Explains Cloud Computing and the Work of Cloud Engineers

An introductory guide aims to demystify cloud computing, describing it as renting computing power from large data-centre operators over the internet and paying only for what is used. The author compares this model to buying electricity from a grid instead of running private generators. It contrasts the older approach of purchasing and maintaining physical servers with today's ability to scale resources up or down within minutes. The piece also outlines the role of a cloud engineer, who plans, builds and maintains systems in the cloud, and offers a realistic starting path for newcomers.

0
ProgrammingDEV Community ·

Shopify Developer Rates in 2026 Range Widely, and Why Fixed Quotes Often Work Better

Shopify developer hourly rates vary from about $15 to $200, reflecting the difference between entry-level theme work and senior platform engineering. Upwork's published figures run from $15 per hour for beginners to $95 for experts, though its averages are pulled down by lower-cost regions. Across countries, North America and Western Europe typically charge two to four times more than South Asia and Latin America, a gap that narrows at the senior level. The author argues that the real cost is rate multiplied by hours, and that a cheaper hourly rate can end up costing more when a developer takes longer. For projects with a defined endpoint, the author recommends a written scope and a fixed price, since that shifts overrun risk onto the developer.

0
ProgrammingDEV Community ·

PHP2Shell flaws CVE-2026-109618 and CVE-2026-109619 call for a 30-day remediation check

Two unauthenticated remote code execution flaws in PHP, CVE-2026-109618 and CVE-2026-109619, are each rated 9.2 under CVSS v4.0. PHP issued fixes in versions 8.5.12, 8.4.27, 8.3.36 and 8.2.35 on October 21, 2026. The article argues that patching alone is not enough, since old workers, embedded runtimes, shared-hosting handlers and new deployments can keep vulnerable paths open. It recommends a weekly 30-day assurance loop that verifies fixed builds on active processes, tracks unowned public PHP assets and documented exceptions, and uses external discovery counts only as prompts for investigation. PHP 8.2 also reaches end of life on December 31, 2026, so the incident should inform longer-term upgrade planning.