Skip to main content
Changes code block to more appropriate quote block.
Source Link
DaveL17
  • 322
  • 2
  • 12

Looks like it's possible after all using the bash operator <<<. This shell command works as intended:

shortcuts run "Test Alert" <<< "My Text Input"

Sample Notification with passed text

"man bash"
 Here Strings A variant of here documents, the format is: <<<word The word is expanded and supplied to the command on its standard input. 

Here Strings
A variant of here documents, the format is:

 <<<word 

The word is expanded and supplied to the command on its standard input.

Update 1: per @Martin R.'s comment above, the following construction also works.

echo "My Text Input" | shortcuts run "Test Alert"

Looks like it's possible after all using the bash operator <<<. This shell command works as intended:

shortcuts run "Test Alert" <<< "My Text Input"

Sample Notification with passed text

"man bash"
 Here Strings A variant of here documents, the format is: <<<word The word is expanded and supplied to the command on its standard input. 

Update 1: per @Martin R.'s comment above, the following construction also works.

echo "My Text Input" | shortcuts run "Test Alert"

Looks like it's possible after all using the bash operator <<<. This shell command works as intended:

shortcuts run "Test Alert" <<< "My Text Input"

Sample Notification with passed text

"man bash"

Here Strings
A variant of here documents, the format is:

 <<<word 

The word is expanded and supplied to the command on its standard input.

Update 1: per @Martin R.'s comment above, the following construction also works.

echo "My Text Input" | shortcuts run "Test Alert"

Adds another method to the answer.
Source Link
DaveL17
  • 322
  • 2
  • 12

Looks like it's possible after all using the bash operator <<<. This shell command works as intended:

shortcuts run "Test Alert" <<< "My Text Input"

Sample Notification with passed text

"man bash"
 Here Strings A variant of here documents, the format is: <<<word The word is expanded and supplied to the command on its standard input. 

Update 1: per @Martin R.'s comment above, the following construction also works.

echo "My Text Input" | shortcuts run "Test Alert"

Looks like it's possible after all using the bash operator <<<. This shell command works as intended:

shortcuts run "Test Alert" <<< "My Text Input"

Sample Notification with passed text

"man bash"
 Here Strings A variant of here documents, the format is: <<<word The word is expanded and supplied to the command on its standard input. 

Looks like it's possible after all using the bash operator <<<. This shell command works as intended:

shortcuts run "Test Alert" <<< "My Text Input"

Sample Notification with passed text

"man bash"
 Here Strings A variant of here documents, the format is: <<<word The word is expanded and supplied to the command on its standard input. 

Update 1: per @Martin R.'s comment above, the following construction also works.

echo "My Text Input" | shortcuts run "Test Alert"

Source Link
DaveL17
  • 322
  • 2
  • 12

Looks like it's possible after all using the bash operator <<<. This shell command works as intended:

shortcuts run "Test Alert" <<< "My Text Input"

Sample Notification with passed text

"man bash"
 Here Strings A variant of here documents, the format is: <<<word The word is expanded and supplied to the command on its standard input.