uspTukubaiコマンドに関する様々な資料がここにあります。

 

 

魂内検索

DOCUMENTS

COMMAND

FORUM

UEC DOCS

VIDEO

 

Alphabetical list

(Video materials in preparation)

rootname(USP)

Name

rootname : Removes the suffix from a path name

Synopsis

Usage   : rootname <path>

Version : Mon Jan 17 11:50:14 JST 2022

Edition : 1

Description

The rootname command outputs <path> with the file suffix removed.

Example 1

$ rootname /home/usp/hogehoge.c

/home/usp/hogehoge

Example 2

The rootname command is often used when processing a file and saving

the result to a filename with a different suffix.

For example, converting all Windows CSV files to UTF-8 field fotmat

files.

for csvfile in *.csv; do

  uconv -Lu -stou $csvfile | fromcsv - > $(rootname $csvfile).txt

done

Reference

basename command = removes the path and returns only the file name

dirname command = returns only the directory name from the path

rootname command = Removes the suffix from the path (USP command)

extname command = Returns the file suffix from a path (USP command)