0

I'm installing legacy Termux on an Android 6.0 device. I downloaded the legacy app- and the legacy packages. There is a txt file with all the symlinks that need to be created. I'm looking for a way to make all the links in one batch run. Either with bash or some other way.

This is the format that the file is in

gawk←./bin/awk
dash←./bin/sh
xzgrep←./bin/xzfgrep
xzdiff←./bin/lzdiff
xzgrep←./bin/lzgrep
xzgrep←./bin/lzegrep
xz←./bin/unxz
xzmore←./bin/lzmore
/data/data/com.termux/files/usr/bin/bzdiff←./bin/bzcmp
/data/data/com.termux/files/usr/bin/bzmore←./bin/bzless

I searched around on the net and have only found a way to make links from one folder with many files to another folder with the same names of the files. but as you can see from the sample above I need different names and also different folders.

Thank You

2
  • 1
    Question isn't specific to Android but about general shell usage. cd <dir>; cat <file> | sed 's|←| |' | while read file link; do ln -s "$file" "$link"; done Aug 7, 2020 at 2:38
  • Thanks @IrfanLatif. I don't use this anywhere besides on my Android so wasn't aware that this isn't an android question. I will try your suggestion BTW Where would be the right place to ask this.?
    – Sruly
    Aug 7, 2020 at 17:25

0

You must log in to answer this question.

Browse other questions tagged .