Skip to main content
http://partmaps.org/era/unix/award.html
Source Link
JdeBP
  • 27.2k
  • 1
  • 76
  • 104

Something like this should do the trick:

cat file | while read line; do touch $line, echo "filename=$line" > $line; done < file

it will open the file, read it line by line, and for each line it will create a file with the name being the content of the line and then write a line to that file with the contents of the echoecho command (being filename=). caveat: I haven't actually tested it.

Something like this should do the trick:

cat file | while read line; do touch $line, echo "filename=$line" > $line; done

it will open the file, read it line by line, and for each line it will create a file with the name being the content of the line and then write a line to that file with the contents of the echo command (being filename=). caveat: I haven't actually tested it.

Something like this should do the trick:

while read line; do echo "filename=$line" > $line; done < file

it will open the file, read it line by line, and for each line it will create a file with the name being the content of the line and then write a line to that file with the contents of the echo command (being filename=). caveat: I haven't actually tested it.

Source Link
MaQleod
  • 13.2k
  • 4
  • 40
  • 61

Something like this should do the trick:

cat file | while read line; do touch $line, echo "filename=$line" > $line; done

it will open the file, read it line by line, and for each line it will create a file with the name being the content of the line and then write a line to that file with the contents of the echo command (being filename=). caveat: I haven't actually tested it.