Difference between revisions of "Echo"

From wikieduonline
Jump to navigation Jump to search
 
(19 intermediate revisions by 5 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>
 +
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>
  
* <code>[[echo -e]] '\a'</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

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: