Example: components (Table 7.3)
#!/usr/bin/csh -f
set test = a/b/c.d
echo "the full string is:" $test
echo "extension (:e) is: " $test:e
echo "head (:h) is: " $test:h
echo "root (:r) is: " $test:r
echo "tail (:t) is: " $test:t
### output:
# the full string is: a/b/c.d
# extension (:e) is: d
# head (:h) is: a/b
# root (:r) is: a/b/c
# tail (:t) is: c.d
Previous slide
Next slide
Back to first slide
View graphic version