Title: Seemingly-obscure `${
Open Graph Title: Seemingly-obscure `${
X Title: Seemingly-obscure `${
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. (I must note tha...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/25760
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Seemingly-obscure `${\u003cfile path>}` feature broken on Linux","articleBody":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n(I must note that searching the Issues page for \"${\" is either not possible or very difficult since there are no results, sorry if this happens to be a dupe!)\n\nWhile reading the PowerShell Wikipedia page, I cane across a sentence that described a feature I have never seen documented:\n\n> Enclosing the path to a file in braces preceded by a dollar sign (as in `${C:\\foo.txt}`) creates a reference to the contents of the file. If it is used as an [L-value](https://en.wikipedia.org/wiki/Value_(computer_science)), anything assigned to it will be written to the file. When used as an [R-value](https://en.wikipedia.org/wiki/Value_(computer_science)), the contents of the file will be read. If an object is assigned, it is serialized before being stored.\u003csup>[[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)]\u003c/sup>\n\nThis works on both Windows PowerShell and Core, but not on Core for Linux.\n\n### Steps to reproduce\n\nOn a Linux system, write\n```pwsh\n${/etc/profile} # (or any other file that exists)\n```\n\n### Expected behavior\n\n```console\nPS> ${/etc/profile}\n\u003c contents of /etc/profile here... >\n```\n\n### Actual behavior\n\n```console\nPS> ${/etc/profile}\n\u003c no output >\n```\n\n### Error details\n\n```console\nn/a\n```\n\n### Environment data\n\n```powershell\nName Value\n---- -----\nPSVersion 7.5.1\nPSEdition Core\nGitCommitId 7.5.1\nOS Debian GNU/Linux 12 (bookworm)\nPlatform Unix\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion 2.3\nSerializationVersion 1.1.0.1\nWSManStackVersion 3.0\n```\n\n### Visuals\n\n_No response_","author":{"url":"https://github.com/helpimnotdrowning","@type":"Person","name":"helpimnotdrowning"},"datePublished":"2025-07-16T18:19:38Z","url":"https://github.com/PowerShell/PowerShell/issues/25760"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e78aebe9-85aa-bbca-38cc-d15da283d3d8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D2C:2FD62:CD6B1:10F119:6AFD2BD6 |
| html-safe-nonce | b05cf5bef2db2e02315fa3a0de57f15f4bdaa18351496e857e5bef1ed874d11b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDJDOjJGRDYyOkNENkIxOjEwRjExOTo2QUZEMkJENiIsInZpc2l0b3JfaWQiOiI4MzAzMzk0NDI0NzEzMTk0NDU0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7129a4ba704b69ba9462c659490dd7e36273ef79c049563f65bd5ed64ce9aadf |
| hovercard-subject-tag | issue:3236926735 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/25760/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d9f15a10a3e0252cb910923a2ecf010d771b0f4e1bc21015ed284a2dc1381e50/PowerShell/PowerShell/issues/25760 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d9f15a10a3e0252cb910923a2ecf010d771b0f4e1bc21015ed284a2dc1381e50/PowerShell/PowerShell/issues/25760 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | helpimnotdrowning |
| hostname | github.com |
| expected-hostname | github.com |
| None | 065128366c233a9d57ff68ab6c96e25b99dd1b0ab70d23b70873d3dd6b5e4f19 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 941021edf0c2ec58298f4a2c8f27ae507d129c92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width