Difference between revisions of "Echo"
Jump to navigation
Jump to search
(14 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
− | [[wikipedia:echo (command)]] | + | <code>[[wikipedia:echo (command)|echo]]</code> [[Bash]] [[builtin]] |
− | |||
− | |||
+ | == Examples == | ||
* <code>[[echo -e]] '\a'</code> | * <code>[[echo -e]] '\a'</code> | ||
− | * <code>echo -n</code> | + | Do not output the trailing [[newline]] |
− | + | * <code>echo -n</code> | |
− | + | [[Truncate]] a file | |
+ | * <code>[[echo]] "" > filename</code> | ||
+ | Print a [[new line]] after command output: | ||
+ | * <code>[[kubectl get secret]] mykubedashboard-[[kubernetes-dashboard]]-token-8wfsh -o jsonpath="{.data.token}" | base64 --decode; echo</code> | ||
+ | == Errors == | ||
+ | gcloud --help | echo | ||
+ | |||
+ | Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> | ||
+ | [[BrokenPipeError]]: [Errno 32] Broken pipe | ||
== Related terms == | == Related terms == | ||
− | * <code>[[printf]]</code> | + | * <code>[[printf]]</code> [[Bash built-in]] |
* <code>[[tput]]</code>: <code>[[tput bel]]</code> | * <code>[[tput]]</code>: <code>[[tput bel]]</code> | ||
* [[Format string attack]] | * [[Format string attack]] | ||
* <code>[[logger]]</code> | * <code>[[logger]]</code> | ||
* <code>[[append]]</code> | * <code>[[append]]</code> | ||
+ | * [[Ansible print and debug examples]] | ||
+ | * <code>[[truncate]]</code> | ||
+ | * [[Echo go web framework]] | ||
== See also == | == See also == | ||
* {{echo}} | * {{echo}} | ||
+ | * {{print}} | ||
* {{Bash}} | * {{Bash}} | ||
[[Category:Programming]] | [[Category:Programming]] |
Latest revision as of 10:15, 8 December 2023
Contents
Examples[edit]
echo -e '\a'
Do not output the trailing newline
echo -n
Truncate a file
echo "" > filename
Print a new line after command output:
kubectl get secret mykubedashboard-kubernetes-dashboard-token-8wfsh -o jsonpath="{.data.token}" | base64 --decode; echo
Errors[edit]
gcloud --help | echo Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> BrokenPipeError: [Errno 32] Broken pipe
Related terms[edit]
printf
Bash built-intput
:tput bel
- Format string attack
logger
append
- Ansible print and debug examples
truncate
- Echo go web framework
See also[edit]
echo
,print, printf
,tput
,logger
,write-output, echo -e, /dev/stdout, banner
print, strcat, echo
Bash [ -c ]
,alias
,&&
, Bash history, Autocompletion,set
,unset
,export
,.bash_aliases, .bashrc and .bash profile
,PS1
,echo
,brace expansion
, Function,shopt
,trap
,set -e
,source
,PATH
,complete
,disown
,.hushlogin
,.bashrc
,builtin
,eval
,set
,$PATH
,$HOME
,TZ
,.profile
,-e, -i
,Builtin (Bash)
,mapfile
,~
, return (Bash), for, until,declare, dirname, basename, functions.sh
, Bash arithmetic expansion,shift, bash --rcfile, readonly, $1, $@
Advertising: