Sample Header Ad - 728x90

Replace prefix string from lines in a file, and put into a bash array

2 votes
3 answers
449 views
In the file groupAfiles.txt are the lines: file14 file2 file4 file9 I need a way to convert them to remove file and add /dev/loop and put them all in one line with a space between them. /dev/loop14 /dev/loop2 /dev/loop4 /dev/loop9 Then I need to put this in an array. (but the numbers change) How do I do this?
Asked by user447274 (539 rep)
Nov 4, 2024, 05:37 AM
Last activity: Nov 4, 2024, 03:37 PM