Skip to content

List Functions

🛠️ Tools · ⬅ Top


listAppend

Add an item to the beginning or end of a

Usage

listAppend listValue separator [ --first | --last | item ]

Add an item to the beginning or end of a text-delimited list

Arguments

  • listValue - Required. Path value to modify.
  • separator - Required. Separator string for item values (typically :)
  • --first - Optional. Place any items after this flag first in the list
  • --last - Optional. Place any items after this flag last in the list. Default.
  • item - the path to be added to the listValue

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

listRemove

Remove one or more items from a text-delimited list

Usage

listRemove listValue separator item ...

Remove one or more items from a text-delimited list

Arguments

  • listValue - Required. List value to modify.
  • separator - Required. Separator string for item values (typically :)
  • item - the item to be removed from the listValue

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

listJoin

Output arguments joined by a character

Usage

listJoin separator text0 arg1 ...

Output arguments joined by a character

Arguments

  • separator - Required. EmptyString. Single character to join elements. If a multi-character string is used only the first character is used as the delimiter.
  • text0 - Optional. String. One or more strings to join

Sample Output

text

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

listCleanDuplicates

Removes duplicates from a list and maintains ordering.

Usage

listCleanDuplicates separator listText

Removes duplicates from a list and maintains ordering.

Arguments

  • separator - String. Required. List separator character.
  • listText - String. Required. List to clean duplicates.
  • --help - Optional. Flag. This help.
  • --removed - Optional. Flag. Show removed items instead of the new list.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error