ArcShell

arcshell_stack.sh

Reference

stack_create

Create a new stack if it does not exist.

> stack_create "stack_name"

stack_add

Add one or more values to the stack.

stack_list

Return the list of values on stack.

> stack_list "stack_name"

stack_delete

Delete a stack if it exists.

> stack_delete "stack_name"

stack_copy

Make a copy of a stack.

> stack_copy "source_stack" "target_stack"

stack_return_last_value

Return the most recent value on the stack.

stack_remove_last_value

Remove the most recent value on the stack.

> stack_remove_last_value "stack_name"

stack_return_first_value

Return the oldest value on the stack.

stack_remove_first_value

Remove the oldest value on the stack.

> stack_remove_first_value "stack_name"

stack_pop_last_value

Return and then remove the most recent value from the stack.

> stack_pop_last_value "stack_name"

stack_pop_first_value

Return and then remove the oldest value on the stack.

> stack_pop_first_value "stack_name"

stack_count

Return the count of items on the stack.

stack_has_values

Return true if the stack has any values.

> stack_has_values "stack_name"

stack_exists

Return true if the stack exists.

> stack_exists "stack_name"

stack_clear

Clear the stack of all values.

> stack_clear "stack_name"

stack_value_count

Return a count of the number of times a value appears in the stack.

> stack_value_count "stack_name" "stack_value"