forked from decal/werdlists
- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpath2file
More file actions
Latest commit
20 lines (16 loc) · 479 Bytes
/
Copy pathpath2file
File metadata and controls
20 lines (16 loc) · 479 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
#
# Using a file containing paths as input, output file names..
#
# Written By: Derek Callaway [decal (AT) sdf {D0T} org]
# Last Modified: Mon Dec 18 22:53:59 PST 2017
# Tested On: Ubuntu 16.04.3 LTS
#
if [ !"$1" ]
then#
echo"usage: $0 PATHFILE"
echo' PATHFILE location of file containing path names to convert to file names'
exit 64
fi
cat -- "$1"| sed -r 's!^.*\/([^/]+)$!\1!g'| egrep '[.]'| sort -u | sed -r 's!^[?]+!!g'
exit 0