You are not logged in.
arch-chroot /mnt
pacman -Sy
echo "most less" > "/root/.testlist.rs"
pacman -S $(cat "/root/.testlist.rs")
# [1] error: target not found: most less
pacman -S $(cat "/root/.testlist.rs" | tr -d '\n' | sed 's/\s$//')
# [2] error: target not found: most less
pacman -S $(eval echo $(cat "/root/.testlist.rs")
# [3] error: target not found: most lessOffline
The problem is not your shell code. "error: target not found:" is a pacman error message. First of all, congratulations, you've found a lot of working versions of "command $(<file)".
Pacman hasn't run within the chroot. There are no remote databases yes (the -S stuff). Try "pacman -Ss most" and will throw an error. You need at least to -Sy once. Depending on how long your pacstrap command is in the past, consider running -Syu directly.
Offline
The problem is that pacman is trying to install a single package literally called "most less". I can't reproduce this with the example given, so I suspect a copypaste error.
I would hazard a guess that you have double quotes around the subshell, e.g.
pacman -S "$(cat "/root/.testlist.rs")"If so remove those.
See also: https://wiki.archlinux.org/index.php/Pa … rom_a_list
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline