Difference between revisions of "Echo"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(4 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
[[Truncate]] a file
 
[[Truncate]] a file
 
* <code>[[echo]] "" > filename</code>
 
* <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>
  
  [[kubectl get secret]] mykubedashboard-[[kubernetes-dashboard]]-token-8wfsh -o jsonpath="{.data.token}" | base64 --decode; echo
+
== 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 19: 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: