Basically, I have a text file (file.txt) that contains strings of numbers (strings don't necessarily have the same length), for example.
1 2 3 4
5 6 7 8
9 10 11 12 13
What I need to do is write new files with each of these numbers deleted one at a time, with a replacement, for example. the first new file will contain
2 3 4 <--- 1st element deleted
5 6 7 8
9 10 11 12 13
and the 7th file will contain
1 2 3 4
5 6 8 <--- 7th element removed here
9 10 11 12 13
, , . . 7- , , , , ,
$lineNo - 2 ( )
$$ 5 6 7 8
cut, , $newline 5 6 8
$lineNo .txt $newline sed:
sed -n '$ lineNo s/.*/'$ newline'/' > file.txt
.
sed: 25.780000:
( 25.780000 - . , $newline - )
, , : (
: ) , sed, ) sed - , ?
!!