User Tools

Site Tools


os_cp:scripting:examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

os_cp:scripting:examples [2026/04/08 22:49] (current)
jkonczak utworzono
Line 1: Line 1:
 +==== simple_vars ====
 +
 +<​html><​pre style="​line-height:​1em">​
 +<span style="​font-weight:​bold;​color:#​00ff00;">​user&#​64;​host</​span><​span style="​font-weight:​bold;​color:#​5c5cff;">​ ~ $</​span>​ X=5
 +<span style="​font-weight:​bold;​color:#​00ff00;">​user&#​64;​host</​span><​span style="​font-weight:​bold;​color:#​5c5cff;">​ ~ $</​span>​ Y=text
 +<span style="​font-weight:​bold;​color:#​00ff00;">​user&#​64;​host</​span><​span style="​font-weight:​bold;​color:#​5c5cff;">​ ~ $</​span>​ Z=&​quot;​Mary had a little lamb&​quot;​
 +<span style="​font-weight:​bold;​color:#​00ff00;">​user&#​64;​host</​span><​span style="​font-weight:​bold;​color:#​5c5cff;">​ ~ $</​span>​ echo $Z $Y$X.txt
 +Mary had a little lamb text5.txt
 +<span style="​font-weight:​bold;​color:#​00ff00;">​user&#​64;​host</​span><​span style="​font-weight:​bold;​color:#​5c5cff;">​ ~ $</​span>​ E=echo
 +<span style="​font-weight:​bold;​color:#​00ff00;">​user&#​64;​host</​span><​span style="​font-weight:​bold;​color:#​5c5cff;">​ ~ $</​span>​ $E $Z &gt; $Y$X.txt
 +<span style="​font-weight:​bold;​color:#​00ff00;">​user&#​64;​host</​span><​span style="​font-weight:​bold;​color:#​5c5cff;">​ ~ $</​span>​ cat text5.txt
 +Mary had a little lamb
 +<span style="​font-weight:​bold;​color:#​00ff00;">​user&#​64;​host</​span><​span style="​font-weight:​bold;​color:#​5c5cff;">​ ~ $</​span>​ export W=word
 +<span style="​font-weight:​bold;​color:#​00ff00;">​user&#​64;​host</​span><​span style="​font-weight:​bold;​color:#​5c5cff;">​ ~ $</​span>​ export Y
 +<span style="​font-weight:​bold;​color:#​00ff00;">​user&#​64;​host</​span><​span style="​font-weight:​bold;​color:#​5c5cff;">​ ~ $</​span>​ echo &​quot;​W=&​apos;​$W&​apos;​ X=&​apos;​$X&​apos;​ Y=&​apos;​$Y&​apos;​ Z=&​apos;​$Z&​apos;&​quot;​
 +W=&​apos;​word&​apos;​ X=&​apos;​5&​apos;​ Y=&​apos;​text&​apos;​ Z=&​apos;​Mary had a little lamb&​apos;​
 +<span style="​font-weight:​bold;​color:#​00ff00;">​user&#​64;​host</​span><​span style="​font-weight:​bold;​color:#​5c5cff;">​ ~ $</​span>​ sh
 +sh-5.1$ echo &​quot;​W=&​apos;​$W&​apos;​ X=&​apos;​$X&​apos;​ Y=&​apos;​$Y&​apos;​ Z=&​apos;​$Z&​apos;&​quot;​
 +W=&​apos;​word&​apos;​ X=&​apos;&​apos;​ Y=&​apos;​text&​apos;​ Z=&​apos;&​apos;​
 +sh-5.1$ Y=&​quot;​another_text&​quot;​
 +sh-5.1$ echo &​quot;​W=&​apos;​$W&​apos;​ X=&​apos;​$X&​apos;​ Y=&​apos;​$Y&​apos;​ Z=&​apos;​$Z&​apos;&​quot;​
 +W=&​apos;​word&​apos;​ X=&​apos;&​apos;​ Y=&​apos;​another_text&​apos;​ Z=&​apos;&​apos;​
 +sh-5.1$ exit
 +exit
 +<span style="​font-weight:​bold;​color:#​00ff00;">​user&#​64;​host</​span><​span style="​font-weight:​bold;​color:#​5c5cff;">​ ~ $</​span>​ echo &​quot;​W=&​apos;​$W&​apos;​ X=&​apos;​$X&​apos;​ Y=&​apos;​$Y&​apos;​ Z=&​apos;​$Z&​apos;&​quot;​
 +W=&​apos;​word&​apos;​ X=&​apos;​5&​apos;​ Y=&​apos;​text&​apos;​ Z=&​apos;​Mary had a little lamb&​apos;​
 +</​pre></​html>​
 +
 +~~META:
 +language = en
 +~~
  
os_cp/scripting/examples.txt · Last modified: 2026/04/08 22:49 by jkonczak