CLI

From AdminWiki

(Difference between revisions)
Jump to: navigation, search
(Get the last element from a cut situation)
m (CLI)
Line 1: Line 1:
= CLI =
= CLI =
-
The Command Line Interface is the powerway to talk to your system
+
Common solutions to common problems.
Line 8: Line 8:
=== Get the last element from a path ===
=== Get the last element from a path ===
-
if you have /path/sub/over/unter/filename.txt and you want to get the filename.txt then do this:
+
if you have /path/sub/over/unter/filename.txt and you want to get the filename.txt basename does the trick:
   echo /path/sub/over/unter/filename.txt | basename
   echo /path/sub/over/unter/filename.txt | basename

Revision as of 16:26, 24 May 2006

CLI

Common solutions to common problems.


Problems and Solutions

Get the last element from a path

if you have /path/sub/over/unter/filename.txt and you want to get the filename.txt basename does the trick:

 echo /path/sub/over/unter/filename.txt | basename
Personal tools