Files

    Read the file’s initial contents

    Output

    0.59.0

    Make the edit to the version number and save it.

    1. > open Cargo.toml | upsert package.version { |p| $p | get package.version | inc --patch } | save Cargo.toml

    Output none

    View the changes we made to the file.

    1. > open Cargo.toml | get package.version

    Output

    0.59.1


    You can parse it into a table.

      Output

      1. ━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━
      2. # │ Band │ Album │ Year
      3. ───┼────────┼────────────────────────┼──────
      4. 0 Fugazi 7 Songs 1988
      5. 1 Fugazi Repeater 1990
      6. 4 Fugazi The Argument 2001
      7. ━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━

      You can alternatively do this using parse.

      Or, you can utilize the headers command to use the first row as a header row like. The only difference would be the headers would match the case of the text file. So, in this case, the headers would be lowercase.

      1. > open bands.txt | lines | split column ":" | headers | sort-by year

      1. > rg -c Value | lines | split column ":" file line_count | into int line_count | sort-by line_count | reverse

      Output