Difference between revisions of "Echo"

From wikieduonline
Jump to navigation Jump to search
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
[[wikipedia:echo (command)]]
+
<code>[[wikipedia:echo (command)|echo]]</code> [[Bash]] [[builtin]]
* [[Bash]] [[builtin]]
 
 
 
  
 +
== Examples ==
 
* <code>[[echo -e]] '\a'</code>
 
* <code>[[echo -e]] '\a'</code>
* <code>echo -n</code> do not output the trailing [[newline]]
+
Do not output the trailing [[newline]]
 
+
* <code>echo -n</code>  
[[kubectl get secret]] mykubedashboard-[[kubernetes-dashboard]]-token-8wfsh -o jsonpath="{.data.token}" | base64 --decode; echo
+
[[Truncate]] a file
 
+
* <code>[[echo]] "" > filename</code>
[[echo]] "" > filename
+
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]]
Line 20: Line 25:
 
* [[Ansible print and debug examples]]
 
* [[Ansible print and debug examples]]
 
* <code>[[truncate]]</code>
 
* <code>[[truncate]]</code>
 +
* [[Echo go web framework]]
  
 
== See also ==
 
== See also ==

Latest revision as of 10:15, 8 December 2023

echo Bash builtin

Examples[edit]

Do not output the trailing newline

  • echo -n

Truncate a file

Print a new line after command output:

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]

See also[edit]

Advertising: