Skip to content
ℕ𝔸𝕊𝔸™ℕ𝕒𝕤𝕒𝕣𝕖™𝕊𝕡𝕒𝕔𝕖𝕏™ https://nasa.re/

Nasare™🚀

フレッシュ スペース & テクノロジー NEWS📢

  • About 𝒩𝒶𝓈𝒶𝓇𝑒™
  • SMART Tools
  • SMART AI
    • Kubeshark PCAP Export/Import
    • Coaching engineering managers to employ on organizational issues
    • Zelda: Hyperlink’s Awakening game engine documentation (2021)
    • Commercial Resupply Services-CRS
  • Show HN
    • WINd3x、iPod Bootrom エクスプロイトは 10 年遅かった
    • Just by Notでプログラミングするシステム オブジェクト指向プログラミングの活用
    • 主な BGP 増加をレジデンス Windows デスクトップに追加する
    • ガジェットの複雑さが増し、余分な IP の再利用が促進される
    • 新しい GitHub CLI 拡張インストゥルメント
    • Kubernetes を 7,500 ノードにスケーリング (2021 年)
    • Wander アプリ用の軽量なオンザフリット構成ライブラリ
    • Ask HN
      • Declare HN: I wrote a WebAssembly Interpreter and Toolkit in C
      • Describe HN: Kandria, an action RPG made in Frequent Voice, is now out
      • Demonstrate HN: ClickHouse-local – a runt instrument for serverless files analytics
      • Brand HN: Motion photographs Watchlist Chrome Extension
      • Existing HN: Connmap – Desktop widget that reveals your TCP company on an international diagram
      • Level to HN: An initiate source tool to generate Jet Engine compressors
      • Insist HN: Ov – characteristic smartly off terminal pager
      • Level to HN: Graphic-Walker – A special kind of originate-offer different to Tableau
      • Level to HN: A corpulent game of snake encoded in a url
      • Point out HN: Kweb: A a ways away interface to the earn browser’s DOM
      • Present HN: Nanelo DNS – Privacy-Kindly, European Nameservers
      • Reward HN: Vim on-line editor the exercise of WebAssembly, storing files the exercise of IndexedDB
      • Show HN: AREnets – TensorFlow-basically based mostly Relation Extraction equipment for work in Colab
      • Speak HN: What sub $200 product improved HN readers’ 2022
      • Uncover HN: Easy internet app for teenagers to management a single Philips Hue light
      • Advise HN: Daft Art – an album veil maker powered by AI and curated aesthetics
    • Show HN
      • Reward HN: Vim on-line editor the exercise of WebAssembly, storing files the exercise of IndexedDB
      • Android phones will at the moment obtain iPhone-love SOS satellite texting
      • Demonstrate HN: ClickHouse-local – a runt instrument for serverless files analytics
      • Show HN: AREnets – TensorFlow-basically based mostly Relation Extraction equipment for work in Colab
      • Present HN: Nanelo DNS – Privacy-Kindly, European Nameservers
      • Insist HN: Ov – characteristic smartly off terminal pager
      • Level to HN: An initiate source tool to generate Jet Engine compressors
      • Speak HN: What sub $200 product improved HN readers’ 2022
      • Advise HN: Daft Art – an album veil maker powered by AI and curated aesthetics
      • Uncover HN: Easy internet app for teenagers to management a single Philips Hue light
      • Level to HN: A corpulent game of snake encoded in a url
    • Brand HN: Motion photographs Watchlist Chrome Extension
    • Existing HN: Connmap – Desktop widget that reveals your TCP company on an international diagram
    • Point out HN: Kweb: A a ways away interface to the earn browser’s DOM
    • Declare HN: I wrote a WebAssembly Interpreter and Toolkit in C
    • Tag HN: Using Key-Value Retail outlets in Serverless Codehooks.io Applications
    • Declare HN: I wrote a WebAssembly Interpreter and Toolkit in C
    • Point out HN: Kweb: A a ways away interface to the earn browser’s DOM
    • Existing HN: Connmap – Desktop widget that reveals your TCP company on an international diagram
    • Brand HN: Motion photographs Watchlist Chrome Extension
    • Level to HN: A corpulent game of snake encoded in a url
    • Uncover HN: Easy internet app for teenagers to management a single Philips Hue light
    • Advise HN: Daft Art – an album veil maker powered by AI and curated aesthetics
    • Speak HN: What sub $200 product improved HN readers’ 2022
    • Level to HN: An initiate source tool to generate Jet Engine compressors
    • Level to HN: Graphic-Walker – A special kind of originate-offer different to Tableau
    • Insist HN: Ov – characteristic smartly off terminal pager
    • Present HN: Nanelo DNS – Privacy-Kindly, European Nameservers
    • Show HN: AREnets – TensorFlow-basically based mostly Relation Extraction equipment for work in Colab
    • Demonstrate HN: ClickHouse-local – a runt instrument for serverless files analytics
    • Reward HN: Vim on-line editor the exercise of WebAssembly, storing files the exercise of IndexedDB
  • A Computer virus and a Dilemma
    • OCIS – OwnCloud Countless Scale
    • A Princeton student built an app which is ready to detect if ChatGPT wrote an essay
    • GitHub Is Sued, and We Would possibly perhaps Learn Something About Creative Commons Licensing
    • Adobe’s Command material analysis can be using photos/videos to narrate AI w/o consent
    • Ultralearning a.k.a. how I learned to code
    • Automatic1111 is assist on GitHub after taking away Embedding Links
    • Where Your Sides Came From
    • What Is a Pig Butchering Rip-off?
    • Submit-processing is ruining iPhone photos
    • Clos Topologies and Centralized Retain a watch on in Google’s Datacenter Community
    • Miller Engineering DS-1 House Planetarium
    • Gimel Studio: Non-harmful, 2D image editor
  • Technology
    • Miller Engineering DS-1 House Planetarium
    • Apple Doctors: to construct it as a file it is advisable to electronic mail it to your self
    • The Air India passenger who urinated on a girl has been fired by Wells Fargo
    • The Filesystem Hierarchy Usual Comes to Guix Containers
    • Sooner than it sued Google for copying from Java, Oracle changed into as soon as copying IBM’s SQL (2020)
    • The i3-gaps mission has been merged with i3
    • Making an Alphorn from Scratch
    • Apple: Braille Individual Guides
    • MotherDuck Is a Original Thought
    • The class of CGI and simple make
    • Like a mercurial tour of DragonFly BSD 6.4?
    • computer science
    • AI
    • Artificial intelligence
    • Technology
    • Ai
    • Apple
    • digital
  • TOP HN
    • anti-Mastodon
    • TOP HN
      • Show HN
      • Ask HN
      • coding
      • ガジェットの複雑さが増し、余分な IP の再利用が促進される
      • 新しい GitHub CLI 拡張インストゥルメント
      • Kubernetes を 7,500 ノードにスケーリング (2021 年)
      • Just by Notでプログラミングするシステム オブジェクト指向プログラミングの活用
      • Describe HN: Kandria, an action RPG made in Frequent Voice, is now out
      • WINd3x、iPod Bootrom エクスプロイトは 10 年遅かった
      • Wander アプリ用の軽量なオンザフリット構成ライブラリ
      • Artificial intelligence
      • 主な BGP 増加をレジデンス Windows デスクトップに追加する
      • Technology
      • Level to HN: Graphic-Walker – A special kind of originate-offer different to Tableau
      • Declare HN: I wrote a WebAssembly Interpreter and Toolkit in C
      • Point out HN: Kweb: A a ways away interface to the earn browser’s DOM
      • Existing HN: Connmap – Desktop widget that reveals your TCP company on an international diagram
      • Advise HN: Daft Art – an album veil maker powered by AI and curated aesthetics
      • Brand HN: Motion photographs Watchlist Chrome Extension
      • Declare HN: I wrote a WebAssembly Interpreter and Toolkit in C
      • Demonstrate HN: ClickHouse-local – a runt instrument for serverless files analytics
      • Describe HN: Kandria, an action RPG made in Frequent Voice, is now out
      • Existing HN: Connmap – Desktop widget that reveals your TCP company on an international diagram
      • Insist HN: Ov – characteristic smartly off terminal pager
      • Just by Notでプログラミングするシステム オブジェクト指向プログラミングの活用
      • Kubernetes を 7,500 ノードにスケーリング (2021 年)
      • Level to HN: A corpulent game of snake encoded in a url
      • Level to HN: An initiate source tool to generate Jet Engine compressors
      • Level to HN: Graphic-Walker – A special kind of originate-offer different to Tableau
      • Point out HN: Kweb: A a ways away interface to the earn browser’s DOM
      • Present HN: Nanelo DNS – Privacy-Kindly, European Nameservers
      • Reward HN: Vim on-line editor the exercise of WebAssembly, storing files the exercise of IndexedDB
      • Show HN: AREnets – TensorFlow-basically based mostly Relation Extraction equipment for work in Colab
      • Speak HN: What sub $200 product improved HN readers’ 2022
      • Uncover HN: Easy internet app for teenagers to management a single Philips Hue light
      • Wander アプリ用の軽量なオンザフリット構成ライブラリ
      • WINd3x、iPod Bootrom エクスプロイトは 10 年遅かった
      • ガジェットの複雑さが増し、余分な IP の再利用が促進される
      • 主な BGP 増加をレジデンス Windows デスクトップに追加する
      • 新しい GitHub CLI 拡張インストゥルメント
      • ロンドンで*ダウン*を継続的に見つめる: Pavement Oddities
      • 報酬 HN: C の 30 行でスピンロック
      • FAA の NOTAM とは何ですか? 航空専門家が機械の仕組みを説明
      • ナノGPT
      • 1 ビット LCD のグレースケール (2022)
      • The Muse (YC W12) は FP&A のシニア ディレクターを採用しています
      • Zen (YC S21) はグロース エンジニアを採用しています
      • Tall Inquire of (YC W21) が B2B 回顧録の幹部を採用
      • Actiondesk (YC S19) は、プロダクト ドレスメーカーを採用しています (4-6 か月の契約)
      • Oven (YC S19) は、Bun を作成するために C/C++ または Zig エンジニアを採用しています。
      • WInd3x, the iPod Bootrom exploit 10 years too unhurried
      • Sign HN: FASTA recordsdata を操作するための FUSE モジュール
      • HN を指します: Socketify.py: PyPy3 および Python3 用の Http/Https および WebSocket サーバー
      • Wage Development Continues to Gradual in the UK and Euro House
      • Stage Supervisor for the unimpressed: 1 Getting started
      • First public free up of Pushup: a brand unique compiler for making net apps in Trip
      • Fixing Cart-Pole Swingup with a Hierarchical Controller
      • Flight Testing the Touchdown Radar for Mars Science Laboratory 2011-06-21T17:36:36Z
      • Flightcontrol (YC W22) is hiring first Developer Recommend
      • Flying boats and other tech for cleaner shipping
      • Four Finalist Touchdown Location Candidates for Mars Science Laboratory 2008-11-19T16:21:01Z
      • France’s prized nuclear sector stalled in Europe’s hour of want
      • French startup unveils new residential thermo-acoustic warmth pump
      • FTC Cracks Down on Firms That Impose Contaminated Noncompete Restrictions
      • FTX’s Aged Prime Lawyer Aided US Authorities in Bankman-Fried Case
      • FY18 NASA lėšų šnypštimas 2017-05-22T00:00:00Z
      • G-3PO: A protocol droid for Ghidra, or GPT-3 for reverse-engineering
      • Gail.com FAQ
      • Gemini-Titan (GT)-6 – Gemini 6 of 7 – 지역 사진 – 외부 지역 1965-12-15T00:00:00Z
      • Geoffrey Hinton Publishes Original Deep Learning Algorithm
      • Germany warns: AI fingers flee already underway (2021)
      • Gimel Studio: Non-harmful, 2D image editor
      • GitHub Availability File
      • GitHub Is Sued, and We Would possibly perhaps Learn Something About Creative Commons Licensing
      • Google needs RISC-V to be a “tier-1” Android architecture
      • Google researcher, lengthy out of math, cracks devilish dispute about gadgets
      • Google start sourced CDC File Transfer from the ashes of Stadia
      • GRC-2003-C-02097 2004-05-01T00:00:00Z
      • GRC-2013-C-05246 2009-11-26T00:00:00Z
      • Hello world!
      • Highlights of Science Launching on SpaceX CRS-15 2018-06-24T00:00:00Z
      • Hilf Al-Fudul
      • HiOperator (YC S16) Is Hiring VP of Engineering
      • HN を指します: Socketify.py: PyPy3 および Python3 用の Http/Https および WebSocket サーバー
      • How kind I blueprint a pair of buttocks?
      • How will the haj switch as international temperatures upward thrust?
      • Human gene linked to bigger brains turned into as soon as born from apparently pointless DNA
      • Hundreds of scientists publish a paper every 5 days
      • In Favor of Friction and Flexibility
      • Indicate HN: Klotho – Change into straightforward code into cloud native code
      • Indoor farming isn’t exact for the smartly off
      • Iranian assault drone came across to have parts from more than a dozen US companies
      • Israeli researcher experiences leak of 235M Twitter-linked e-mail addresses
      • Jam Stations in Low Earth Orbit
      • Jazz Is Freedom
      • JPL-20171102-TECHf-0001-ドローントリップ 人間vs機械 2017-11-17T00:00:00Z
      • JPL에서 NASA의 MSI 콘도미니엄 액셀러레이터 2022-08-25T00:00:00Z
      • JPSO extinct facial recognition abilities to arrest a man. The tech modified into once defective
      • jsc2017e136097 – 12 月 4 日,俄罗斯联邦地区公司 (Roscosmos) 的远征 54-55 号机组人员 Anton Shkaplerov 在俄罗斯 Principal person City 的加加林宇航员训练中心上向整洁的祝福者挥手致意,当时他登上了前往附近的 Chkalovsky Ai 的公共汽车2017-12-04T00:00:00Z
      • Kemble’s Cascade of Stars
      • Kepler-90 マシン (アーティストの考え) 2017-12-14T00:00:00Z
      • Koichi Wakata SpaceX 코칭 2022-06-27T00:00:00Z
      • KSC and Proud to Be Heart-Wide Diversity Tournament 2019-08-20T00:00:00Z
      • KSC ir „Proud to Be Center“ įvairovės turnyras 2019-08-20T00:00:00Z
      • AI
      • Artificial intelligence
      • Auto-Generate
      • anti-Mastodon
      • Awesome
      • BioSentinel
      • CATEGORIES
      • DC
      • Dione
      • Diversity
      • drone racing
      • drones
      • Dulles
      • education
      • Event
      • filmstock
      • Goddard
      • AI
      • Ask HN
      • autonomous
      • coding
      • computer science
      • Clusters
      • Artificial intelligence
        • Ai
        • Apple
        • Tesla
        • digital
        • MESSENGER
        • Device
        • Charts
        • change
        • Shows
        • fraud
        • Former
        • fucking
        • purge
        • Works
        • entering
        • Databases
        • Review
        • Strangely
        • Instinct
        • staff
        • Salesforce
        • intern
        • Involuntary
        • promise
        • Twilio’s
        • nisv live
        • attack
        • Iranian
        • France’s
        • prized
        • infrastructure
        • Debian-based
        • nisv s02 ep03
        • siduction
        • Awesome
        • Calculate
        • Beautiful
        • Linux
        • Start
        • dollar
        • Messier
        • Daughters
        • ‘Breakthrough’
        • obesity
        • Al-Fudul
        • sixty years
        • PyTorch
        • discloses
        • Ancient
        • Stone
        • Popup
        • design
        • public
        • expanding
        • cloud
        • forest
        • startup
        • French
        • batteries
        • fleas
        • spotted
        • Petals
        • language
        • Habitual
        • checking
        • GitHub
        • Availability
        • layers
        • inconsistencies
        • Affair
        • Quasi-War
        • Sergey
        • Irate
        • bestseller
        • necessarily
        • Scientists
        • Titan
        • twitch
        • FGS/NIRISS – Fine Guidance Sensor/Near InfraRed Imager and Slitless Spectrograph
        • infrared
        • ISIM – Integrated Science Instrument Module
        • JHU – Johns Hopkins University
        • JWST – James Webb Space Telescope
        • JWST – James Webb Space Telescope
        • absolute zero
        • Big Bang
        • Peace
        • Studio
        • Making
        • project
        • -gaps
        • warns
        • Germany
        • Braille
        • MotherDuck
        • prototype
        • Challenges
        • Infinite
        • OwnCloud
        • Novel
        • Before
        • copying
        • California
        • getting
        • States
        • Criminal
        • Brother
        • Released
        • Method
        • owners
        • ‘richsession’
        • email
        • Elements
        • Where
        • passenger
        • Hierarchy
        • Filesystem
        • economic
        • Crew Dragon
        • Bridenstine
        • Scientific
        • Heaviosity
        • Patterns
        • Unexpected
        • minimalist
        • Ecode
        • Alpha
        • Wolfram
        • Tailwind
        • HiOperator
        • Klotho
        • TEAMS
        • ROBOTICS
        • Antelope
        • Sponsors
        • Ellen Gertsen
        • Transform
        • Flightcontrol
        • subscriptions
        • Internet
        • Theory-building
        • you’re
        • looking
        • Transfer
        • error’
        • Tails
        • migrate
        • Building
        • Bitmovin
        • Remote
        • PhotoRoom
        • Company
        • Taking
        • Ribbon
        • BibDesk
        • Android
        • profilers
        • phones
        • modern
        • Mastercard
        • private
        • We’ve
        • reportedly
        • Microsoft
        • Artsy
        • trades
        • skilled
        • Polygon
        • Flying
        • Princeton
        • Codemods
        • Coaching
        • UK’s
        • popping
        • sourced
        • Wikipedia
        • admin
        • Indoor
        • quick
        • Mysterious
        • Spotify
        • Fancy
        • Spotify
        • Weird
        • mail-order
        • Recipients
        • computer
        • optics
        • partnership
        • commercial
        • telemetry
        • Crisis
        • billionaire
        • Party
        • Onelab
        • Faster
        • general
        • Adobe’s
        • database
        • FinanceDatabase
        • Numerical
        • Freedom
        • concrete
        • Stacks
        • computer science
        • NASA
    • Show HN
    • Ask HN
    • Technology
    • computer science
    • coding
    • Clusters
    • AI
    • drones
    • autonomous
    • Auto-Generate
    • Ask HN
    • Show HN
    • The SMART Science™
    • google
  • CRYPTO
    • Blockchain
    • farming
    • Billionaires
    • FTX’s
    • FinanceDatabase: A database of 300.000 symbols (ETFs, Currencies, Crypto)
  • Artificial intelligence
  • Toggle search form
  • 私の最新のTower of Insane Energy
    私の最新のTower of Insane Energy anti-Mastodon
  • 知っている: AI チャットボットの人格権に魅了されて始める時が来ましたか?
    知っている: AI チャットボットの人格権に魅了されて始める時が来ましたか? anti-Mastodon
  • Prove HN: Moochacha、量子収集ファイル暗号化 (Frama-C によって分析)
    Prove HN: Moochacha、量子収集ファイル暗号化 (Frama-C によって分析) Awesome
  • 無謀なアメリカの 777 パイロットが NTSB のインタビューを拒否
    無謀なアメリカの 777 パイロットが NTSB のインタビューを拒否 American
  • Google の 20 年間の検索優位性はほぼ完全な状態ですか?
    Google の 20 年間の検索優位性はほぼ完全な状態ですか? -year
  • アーティストが Balance AI、Midjourney などに対して集団訴訟を起こす
    アーティストが Balance AI、Midjourney などに対して集団訴訟を起こす anti-Mastodon
  • The Involuntary Pacifists
    The Involuntary Pacifists NASA
  • マイク・ホプキンス宇宙飛行士 メリーランド科学センターへのアドバイスを検索 2014-06-09T00:00:00Z
    マイク・ホプキンス宇宙飛行士 メリーランド科学センターへのアドバイスを検索 2014-06-09T00:00:00Z 38
  • Generalist Seed VCの死
    Generalist Seed VCの死 anti-Mastodon
  • Dwarf Fortress has bought half of 1,000,000 copies
    Dwarf Fortress has bought half of 1,000,000 copies Artificial intelligence
  • Petals: High-tail 100B+ language models at house bit-torrent style
    Petals: High-tail 100B+ language models at house bit-torrent style Artificial intelligence
  • Bid HN: アプリケーションを編集できるようにプログラムを自律的に変更する GPT-4
    Bid HN: アプリケーションを編集できるようにプログラムを自律的に変更する GPT-4 autonomously
  • GRC-2003-C-02097 2004-05-01T00:00:00Z
    GRC-2003-C-02097 2004-05-01T00:00:00Z Ask HN
  • This image turned into taken by NASA’s EPIC camera onboard the NOAA DSCOVR spacecraft 2023-01-03 18:32:08
    This image turned into taken by NASA’s EPIC camera onboard the NOAA DSCOVR spacecraft 2023-01-03 18:32:08 image
  • Linuxの防弾を提供するためのハント
    Linuxの防弾を提供するためのハント anti-Mastodon
[ “x$var” = “xval” ] の要点は何でしたか?  (2021)

[ “x$var” = “xval” ] の要点は何でしたか? (2021)

Posted on March 8, 2023 By 📢𝕊𝕡𝕒𝕔𝕖𝕏™

シェルスクリプトでは、各タグの前に「x」を付けて比較する戦略を立てることはめったにありません。 ここにGitHubからのいくつかの例があります:

もしも ; もし [ "x${server_ip}"="xlocalhost" ]; 次に if test x$1='x--reduction' ; それから

これをx-hackと名付けよう

)任意の POSIX 準拠シェル [ “x$var”=”x!” ] の場合、x-hack のタグは正確にゼロです: この比較可能性は x 100%当時の。 しかし、なぜそれが物だったのですか? オンライン情報源を大切にする )このstackoverflow Q&Aは、引用に代わるものであると発表する小さな手品です(oof )、楽観的なシェルの「いくつかのバージョン」で障害の方向を指し示すか、具体的な例のない特に老朽化したUnixガジェットの神秘的な動作に反対する全体的な警告について.

取得するかどうかを取得するには ShellCheck[ “x$left”=”x$right” ] はこれについて警告をミュートする必要があります。 長い発信根拠 のはずですが、 の縮小で Unix の歴史を掘り下げることにしました。 The Unix Heritage Society のアーク蕁麻疹。 悲しいことに、HP-UX や AIX などの厳重に保護された世界にラベルを付けることができなかったので、恐竜の飼育者は気をつけてください。

これらは、私がいつか遭遇した、おそらく失敗する可能性のあるインスタンスです.

左辺は単項演算子に適合します

1973 年の AT&T Unix v6 シェル。 1977 年以降の PWB/UNIX は、左辺が単項演算子に一致するテスト命令を回避できませんでした。 これは、ラインパラメータを公開することを想定しようとした誰かにとっては明らかだったに違いありません:

% arg=”-f” % test “$arg”=”-f” syntax error: -f % test “x$arg”=”xf” (実数)

これは、1979 年にビルトインされた AT&T Unix v7 Bourne シェル内にマウントされていました。 テスト と [ were also available as separateexecutables, and appear to have retained a variant of the buggy behavior:

$ arg="-f"$ [ "$arg"="-f" ] (偽物) $ [ "x$arg"="x-f" ] (本物)  

これは、ユーティリティが単純な再帰降下パーサーの脆弱性を持っているため、機能が追加されましたバックトラックなしで、単項演算子が二項演算子よりも優先され、末尾の引数に気付かれませんでした.

パブリック アリーナ KornShell によってコピーされていた「スタイルの」ボーン シェルの動作 1988 年に、1992 年に POSIX.2 のセグメントを作成しました。GNU Bash 1.14 は、組み込み  に対して同じことを行いました。 [, and the GNU shellutils package that provided the external test/[ binaries followed POSIX, so the early GNU/Linux distros like SLS were not affected, nor was FreeBSD 1.0.

The x-hack is effective because no unary operators can start with x.

Either side matches string length operator -l

A similar issue that survived longer was with the string length operator -l. Unlike the normal unary predicates, this one was only parsed as part as part of an operand to binary predicates:

var="helloworld"[ -l "$var" -gt 8 ] && echo "文字列が 8 文字を超えています"  [ ( ! "$str" ) ] それを POSIX に組み込むことができなかった理由は、「ほとんどの実装で文書化されていなかったため、一部の実装からはかけ離れており (プラン V と並んで)、機能が提供されている」ためです。 [ "x$var"="x-l" ]を参照してください。 .

UNIX v7 では近隣ではなくなりました [ "x$var"="x!" ]=が優先されましたが、1996 年からの Bash 1.14 は入り口で貪欲に解析していました: $ var="-l" $ [ "x$var"="x-l" ] テスト: -l: 期待される二項演算子 $ [ "x$var"="x-l" ] (rea l)

かつては直立した近所でもあった――手の側面ですが、ネストされた式では最高です。 -l テストは、2 次元の引数があった場合に特に行われたため、それをトリガーするために追加の式または括弧が必要になるだけです:

$ [ "x$var"="x!" ] [ "x$var"="x!" ] (リアル)

この演算子は、その年の後半に Bash 2.0 で削除されました。

[ ( ! "$str" ) ] 左側面は !

一初期のシェルの他の環境は、左辺が否定演算子 だったときでした! : $ var="!" $ [ "x$var"="x!" ] テスト: 引数が予想される (UNIX v7、1979) テスト:=: 単項演算子が予想される (bash 1.14、1996) (偽造) (pd-ksh88、1988) $ [ "x$var"="x!" ] (本物)

1 回おきに、x-hack は ! が否定演算子として識別されないようにします。

ksh はこれを と同じように処理した) [ ! "=" ]

、引数の緩和に気付かなかった。 この静けさは、=として偽物を返しました は null 文字列ではなくなりました。 Ksh は、こ​​の泣き言の日に続く引数を無視し続けています: $ [ -e / random words/ops here ] (本物) (ksh93, 2021) bash: [ “x$left”=”x$right” ] テスト: 引数が期待される $ [ “x$left”=”x$right” ] (本物)

これは、( は よりも優先されます。=になり、無効な括弧コミュニティになります。

なぜこれが私の好物なのか? Glimpse Scurry 0.5.4 (2009 年を除く):

$ left="(" upright="(" $ [ "$left"="$right" ] [: 1: 閉じ括弧が期待される $ [ "x$left"="x$right" ] (本物) 

それはかつて活発なバグでした StackOverflow Q&A が投稿されていたとき

しかし、待って、おまけがあります!

これが Zsh です

2015年後期 、モデル 5.3 よりも早く直立: % 左=”(“直立=”)” % [ ( ! “$str” ) ] (本物) % [ “x$left”=”x$right” ] (偽物)

驚くべきことに、x-hack は、StackOverflow がベテランの遺物としてそれを書き留めてから 7 年後の 2015 年を除いて、あなたの全体的な計画を楽観的なバグで回避する作業に苦しんでいます。過去の!

バグは、いつか戦略に追加され、さらにインテリジェントになると主張するのは無意味です。 Zsh one supreme は、左括弧を直立括弧と比較して評価するときにトリガーされます。それ以外の場合、パーサーはバックトラックしてそれを優先します。

もう 1 つの段階的なホールドアウトは Solaris であり、その /bin/sh はレガシーでしたBourne シェルは 2009 年の Solaris 10 と同じくらい段階的です。繰り返しになりますが、これは確かに互換性のためであり、もはや実行可能なシェルであると彼らが信じていたからではありません。 「要件に準拠した」シェルは、2011 年にデフォルトで ksh93 に切り替わることで、Solaris 11 がそれ​​を 21 世紀に引きずり込み、あるいは 90 年代にまで引きずり込むよりもずっと前から、非常に長い間チャンスでした。

のすべてのインスタンスで、オペランドが括弧として識別されるのを防ぐため、x-hack は効率的です

結論

)x-hack は、1 つ以上のシェルでいくつかの正確で実用的な問題に対抗して、確かに貴重で効率的でした.

 

またしても、このタグは 1990 年代半ばから後半までほとんどが通過していました。 2010 年よりも早く、最終的な障害が解決された例はほとんどありません。 最後のワンマン 2015年を除いて結論を下すのに古くなっていますが、1つのつぶやき非ガジェットシェルで開き括弧から閉じ括弧を評価する非常につぶやきのケース内で最高です。

私はこの慣用句を廃止する時が来たことを救い、ShellCheck [, and the GNU shellutils package that provided the external test/[ binaries followed POSIX, so the early GNU/Linux distros like SLS were not affected, nor was FreeBSD 1.0.

The x-hack is effective because no unary operators can start with x.

Either side matches string length operator -l

A similar issue that survived longer was with the string length operator -l. Unlike the normal unary predicates, this one was only parsed as part as part of an operand to binary predicates:

var="helloworld"[ -l "$var" -gt 8 ] 今は余裕があります デフォルトで推奨されるスタイル 

エピローグ[ "x$var"="x-l" ]

[ “x$var”=”x-l” ]のスカリー環境 は、 2008 年に Bash 3.2.48 と Scurry 0.5.4 の両方に影響を与えた元のファイルです。最近の macOS bash では、ラベルをミュートすることもあると思われます: $ str="-e" $ [ ( ! "$str" ) ] [: 1: closing paren expected # dashbash: [: `)' expected, found ] # bash [ "x$var"="x!" ] POSIX は 4 つのパラメーターについてこれらすべてのあいまいさを修正し、シェル条件がビルド全体で同じプロットで機能することを保証します。 、あなたの合計時間。 Scurry のメンテナーである Herbert Xu は次のように説明しています 修理の範囲内:

/POSIX 処方箋: これを書いた人はノーベル平和賞に値します。 */

%%item_read_more_button% %

Artificial intelligence, Ask HN, Point, Show HN, Technology, TOP HN, var” Tags:Point, Show NH:, var”

Post navigation

Previous Post: つま先でそれを伝えるように設計された技術を保存する、AI によって生成された開示資料の拡散
Next Post: Camouflage HN: Accomplish Animate – 私たちの新しいブラウザ – 本質的に本質的にベースのアニメーション マシン

Related Posts

  • Use.GPU がトラッドに
    Use.GPU がトラッドに Artificial intelligence
  • CAN バスを介して自動車でマリオカート 64 を見守る (2016)
    CAN バスを介して自動車でマリオカート 64 を見守る (2016) Artificial intelligence
  • Gossip Glomers: Cruise.io で配布されたテクニックの課題
    Gossip Glomers: Cruise.io で配布されたテクニックの課題 Artificial intelligence
  • 偽情報を擁護した後、Comcast は FCC ブロードバンド方式のもう 1 つの誤りを認める
    偽情報を擁護した後、Comcast は FCC ブロードバンド方式のもう 1 つの誤りを認める After
  • 州 HN: 自己ホスト型の ChatGPT UI を作成しました
    州 HN: 自己ホスト型の ChatGPT UI を作成しました Artificial intelligence
  • 単一の GPU で ChatGPT が大好きな優れた言語の実行
    単一の GPU で ChatGPT が大好きな優れた言語の実行 Artificial intelligence
  • Kotlin Info Classes 101: 構文、使用法、継承の解決
    Kotlin Info Classes 101: 構文、使用法、継承の解決 Artificial intelligence
  • JavaScript なしでアクセシブルなハンバーガー ボタン
    JavaScript なしでアクセシブルなハンバーガー ボタン Accessible
  • YouTube CEOのスーザン・ウォジッキが辞任
    YouTube CEOのスーザン・ウォジッキが辞任 Artificial intelligence
  • Medicare Profit プランは、アルゴリズムを使用して高齢者のように切り捨てます。
    Medicare Profit プランは、アルゴリズムを使用して高齢者のように切り捨てます。 Advantage

Recent Posts

  • PathPicker: stdin からパスを取得し、それらに対して任意のコマンドを要求する TUI
  • ThinkPad の 25 年間: 最高かつ最も革新的な製品 (2017)
  • 私のライセンスされた Obsidian プラグイン
  • SushiDAOの料理長にSECによる召喚状
  • ChatGPT プラグイン

Recent Comments

  1. robga on Excessive Avenue コーヒーのカフェイン ステージはさまざまで、テストでは
  2. Loic on 行方不明の放射性タブレットは、必死の捜索の後、WA奥地で偶然見つけました
  3. minihat on メタは、標準的な VR e スポーツ Echo Area をシャットダウンします
  4. dafelst on フレーム ポインターの巻き戻しによる Move 実行トレーサーのオーバーヘッドの削減
  5. cloudking on GraphGPT: 構造化されていないテキストの肯定的な素材からのレコードデータ グラフの外挿
  • カモフラージュを表示 HN: Data Painter – データを操作するための非常に多くの機能
    カモフラージュを表示 HN: Data Painter – データを操作するための非常に多くの機能 Awesome
  • Steam デッキは意図的に生まれたわけではありませんが、現在は意図的です
    Steam デッキは意図的に生まれたわけではありませんが、現在は意図的です anti-Mastodon
  • タフト CSS
    タフト CSS Artificial intelligence
  • OpenAI を搭載したアプリは、医師の診察中に患者のメモを即座に転記します
    OpenAI を搭載したアプリは、医師の診察中に患者のメモを即座に転記します anti-Mastodon
  • PySpice: デジタル回路のシミュレーション Python と Ngspice/Xyce シミュレーターの演習
    PySpice: デジタル回路のシミュレーション Python と Ngspice/Xyce シミュレーターの演習 anti-Mastodon
  • Mac で Express AI を使用して、録音したオーディオとビデオをテキストに書き起こす
    Mac で Express AI を使用して、録音したオーディオとビデオをテキストに書き起こす anti-Mastodon
  • Preliminary V: Vim で使用するために Bluetooth キーボードに改造された BMW シフター
    Preliminary V: Vim で使用するために Bluetooth キーボードに改造された BMW シフター Artificial intelligence
  • Expose HN: Discord ボットとしてデプロイされた Langchain 医師向けの ChatGPT
    Expose HN: Discord ボットとしてデプロイされた Langchain 医師向けの ChatGPT anti-Mastodon
MAILANON
2100 MAIL
SEO
METAVERSE
BioLINK
CRYPTO MINING
CASINO
DEFI-TRACKER
StartApp Network
RAVES-MONSTER-GAME
RAVES EXCHANGE
RAVES NFT
KVANTA TV

Copyright © 2023 Nasare™🚀.

Powered by PressBook News Dark theme