Created
April 5, 2020 15:27
-
-
Save selimhex/45631a500a8b370d3da9d2fde8c76458 to your computer and use it in GitHub Desktop.
read folder names from a txt file and create soft links to them from the current directory in bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/YOU/Music/iTunes/iTunes Media/Music/ARTIST_FOLDER | |
/Users/YOU/Music/iTunes/iTunes Media/Music/ANOTHER_ARTIST_FOLDER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
folders_to_link="folders_to_link.txt" | |
#read each line of the txt file (including the last:) ) | |
#create a link to each of them in the current directory | |
while read line || [ -n "$line" ]; do ln -sv "${line}"; done < $folders_to_link |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment