Sample Header Ad - 728x90

What is wrong in this shell script?

0 votes
1 answer
1564 views
It can not generate two temp-files! Why not? Please help!! The input-file has two columns for the file names. But it fails to copy the TWO-files "fn1", "fn2" into "Data1.dat", "Data2.dat" What is wrong here??
#!/bin/bash

FF1=$1
while IFS=" " read -r line1  line2; 
do
  fn1=$line1
  fn2=$line2

  cp $fn1   Data1.dat
  cp $fn2   Data2.dat

...other ext-scripts!...

done  < $FF1
` This code failed copying, so as to generate those two temporary data-files! There are STILL the"error-messages for cp-operation lines" Please help to make the two files correctly. Thx.
Asked by David (1 rep)
Oct 5, 2019, 03:44 AM
Last activity: Oct 5, 2019, 05:59 AM