5
submitted 1 year ago* (last edited 1 year ago) by chimay@lemmy.world to c/shell@programming.dev

cross-posted from: https://lemmy.world/post/1838642

link-batch is a minimalist script that generate symlinks from a list in a text file. Usage :

link-batch.zsh link-list.txt

where link-list.txt contains two columns : the first one for the links and the second one for the targets. Example :

~/.config/kitty	~/myfiles/config/kitty
~/.config/nvim	~/myfiles/config/neovim
~/.config/MuseScore	~/myfiles/config/MuseScore/$HOST
...

The two columns must be separated by a tab.

Shell vars like $HOME or $HOST are evaluated to their values.

Can be used to quickly deploy all home links in a fresh box.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 20 Jul 2023
5 points (100.0% liked)

Shell Scripting

1348 readers
4 users here now

From Ash, Bash and Csh to Xonsh, Ysh and Zsh; all shell languages are welcome here!

Rules:
  1. Follow Lemmy rules!
  2. Posts must relate to shell scripting. (See bottom of sidebar for more information.)
  3. Only make helpful replies to questions. This is not the place for low effort joke answers.
  4. No discussion about piracy or hacking.
  5. If you find a solution to your problem by other means, please take your time to write down the steps you used to solve your problem in the original post. You can potentially help others having the same problem!
  6. These rules will change as the community grows.

Keep posts about shell scripting! Here are some guidelines to help:


In general, if your submission text is primarily shell code, then it is welcome here!

founded 1 year ago
MODERATORS