Transliteration-related information
#28
(08-11-2023, 08:24 AM)ReneZ wrote: You are not allowed to view links. Register or Login to view.Perhaps I have a simple script somewhere (227 lines long) that renames all files, but I won't bet on it as I never needed it. It would probably take about 10 minutes of copying, pasting and modifying, which is unfortunately error-prone.

I have renamed the files with a script. The code must be saved in a file, e.g. "gen_list.sh".

- The file "RF1a-n.txt" must be in the same directory as "gen_list.sh".
- The folder "RF" from You are not allowed to view links. Register or Login to view. must be in the same directory.
- "Your_path" in "gen_list.sh" must be adapted ( reference to directory in which "gen_list.sh" is located )


Code:
#!/bin/sh grep '<! $Q=' RF1a-n.txt >> folio_list.txt awk -F'>' '{print $1}' folio_list.txt >> folio_list2.txt rm ./folio_list.txt cat folio_list2.txt | sed -e 's/^.\{,1\}//' > folio_list3.txt rm ./folio_list2.txt mv folio_list3.txt folio_list.txt cd /Your_path/RF ls  | paste - /Your_path/folio_list.txt | awk 'NF == 2 { print "mv ", $1, $2 } ' | bash rm -f /Your_path/folio_list.txt


.zip   all_pages.zip (Size: 126.24 KB / Downloads: 22)
Reply


Messages In This Thread
Transliteration-related information - by ReneZ - 21-01-2023, 09:03 AM
RE: Transliteration-related information - by bi3mw - 08-11-2023, 08:19 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)