Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 2.69 KB

delete.md

File metadata and controls

21 lines (15 loc) · 2.69 KB

Delete

The delete command allows you to delete data in any supported data structure.

Usage

$ echo '{"name":{"first":"Tom","last":"Wright"}}' |
  dasel delete -r json 'name.last'
{
  "name": {
    "first": "Frank"
  }
}

See the function documentation for information on the available selectors.

Flags/Args

FlagTypeDescriptionDefault
--colourboolPrint colourised output.false
--escape-htmlboolEscape HTML tags when writing output.false
-f, --filestringThe file to query.
If no file is given dasel reads from stdin.
-o, --outstringThe file to write results to.
If no file is given dasel writes to --file.
If --file is stdin, dasel writes to stdout.
--prettyboolPretty print the output.true
-r, --readstringThe parser to use when reading.
If no parser is given dasel attempts to find a parser from the --file flag.
-s, --selectorstringThe selector used to query the input data.
If no flag is given dasel attempts to use the first argument as the selector.
-w, --writestringThe parser to use when writing.
If no parser is given dasel attempts to find a parser from the --out flag.
If no --out flag is given dasel uses the --read flag.
--csv-commastringThe separator used when working with csv files.,
--csv-write-commastringThe separator used when writing csv files.value of --csv-comma
--csv-commentstringThe comment character used when working with csv files.
--csv-crlfboolTrue to write csv files with a \r\n instead of \n.false