kojiro 1282309745 learn basename(1) can strip the directory and extension from a path. (a/b/c.d -> c.d or c). Or you can use a parameter expansion: "${path##*/}" or "${path%.*}" lhunath 1331328712 forget lhunath 1331328717 learn basename(1) can strip the directory and extension from a path (a/b/c.d -> c.d or c). A parameter expansion can do it cleaner and *much* faster: "${path##*/}", "${path%.*}" seesolve 1331330097 forget seesolve 1331330127 learn basename(1) can strip the directory and extension from a path (a/b/c.d -> c.d or c); can also strip directory from multiple paths (a/b/c, d/e/f, -> c, f) using -a. A parameter expansion can do it cleaner and *much* faster: "${path##*/}", "${path%.*}" lhunath 1331330447 forget lhunath 1331330453 learn basename(1) can strip the directory and extension from a path (a/b/c.d -> c.d or c). A parameter expansion can do it cleaner and *much* faster: "${path##*/}", "${path%.*}" koala_man 1393460245 forget koala_man 1393460315 learn basename(1) can strip the directory and extension from a path (a/b/c.d -> c.d or c). A parameter expansion can do it cleaner and *much* faster: "${path##*/}", "${path%.*}", at the cost of missing corner cases like path=/ or path=/foo/ koala_man 1393460341 forget koala_man 1393460346 learn basename(1) can strip the directory and extension from a path (a/b/c.d -> c.d or c). A parameter expansion can do it cleaner and *much* faster: "${path##*/}", "${path%.*}", at the cost of missing corner cases like path=/ selk 1393460657 forget selk 1393460710 learn basename(1) can strip the directory and extension from a path (directory/subdirectory/filename.extension -> filename.extension or filename). A parameter expansion can do it cleaner and *much* faster: "${path##*/}", "${path%.*}", at the cost of missing corner cases like path=/ geirha 1454534540 forget geirha 1454534542 learn basename(1) can strip the directory and extension from a path (directory/subdirectory/filename.extension -> filename.extension or filename). A parameter expansion can do it cleaner and *much* faster: "${path##*/}", "${path%.*}", at the cost of missing edge cases like path=/ geirha 1454534631 forget geirha 1454534637 learn basename(1) can strip the directory and extension from a path (dir/subdir/file.ext -> file.ext or file). A parameter expansion can do it cleaner and *much* faster: "${path##*/}", "${path%.*}", at the cost of missing edge cases like path=/ mknod 1529442756 forget mknod 1529442789 learn basename(1) can strip the directory and extension from a path (dir/subdir/file.ext -> file.ext or file). A parameter expansion can do it cleaner and *much* faster: "${path##*/}", "${path%.*}", at the cost of missing edge cases like path=/ or path=/path/to/dir/