BBC.SHARED.JOBI.TEMPFILE-ADD

Summary

Object type
JOBI
Object Folder
PACKAGES/BEST-BLU/BBC.SHARED/SOURCE/TEMPFILES
Title
Adds text to a temporary file
Archive Key 1
-
Archive Key 2
-
Created
WRITER/B4A am: 2022-03-24 08:00:42
Last Modified
WRITER/B4A am: 2022-07-01 19:11:52 11 x
Last Used
-

Description

This include adds a line to a temporary file that has been created with the include BBC.SHARED.JOBI.TEMPFILE_CREATE

Requirements

  • Unix: bash
  • Windows: Powershell 7.0

Parameter

$ENTRY$
defines the line to add to the temporary file

Input

Output

Unix

$bbcs_temp_file
script variable containing the name of the temporary file

Windows

$bbcs_temp_file
powershell variable containing the name of the temporary file

Example

:include BBC.SHARED.JOBI.TEMPFILE-ADD $ENTRY$ = "<value>"

Process

:switch &$PLATFORM#
:case "UNIX"
:  set &item# = resolve_var( "$ENTRY$" )
echo '&item#' >> $bbcs_temp_file
:case "WINDOWS"
:  inc BBC.SHARED.JOBI.ESCAPE4POWERSHELL $STRING$ = "$ENTRY$"
"&BBCS_ESCAPED_STRING_O#" | Add-Content $bbcs_temp_file.fullName
:other
:  p "unsupported platform &$PLATFORM#"
:endswitch