1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/bash # Synopsis: dereferce_links_in_list # # This function reads a list from STDIN, dereferences the links and prints it to STDOUT function dereferce_links_in_list() { for lnk in $(cat) do readlink -m $lnk done }