Skip to content

Instantly share code, notes, and snippets.

@tingletech
Last active August 29, 2015 14:21
Show Gist options
  • Save tingletech/dc3fa313967ff62ab500 to your computer and use it in GitHub Desktop.
Save tingletech/dc3fa313967ff62ab500 to your computer and use it in GitHub Desktop.
# perl sca_category_paths.pl < input.txt > output.txt
{
chomp; # \n
$orig = $_;
s/\$Categories://; # remove $Categories: from heiarachy
s/\$//;
s/::/_/g; # use in some time strings in values, Change Reference - Skipped Assets:2011-11-18 11::18::49
s/\//_/g; # '/' can be part of the value -> _
s/\s/_/g; # ' ' can be part of the value -> _
s/:/\//g; # ':' is the path seperator -> /
s/&#xa;//g;
s/&amp;/+/g;
s/Collection_No./Collection/;
print "$orig\t$_\n";
}
while read p; do
base=$(basename "$p" | perl -ne 'print lc')
nx upfile "$p" -doc "/asset-library/UCI/UCIHistory/Publications/$base"
done <pdfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment