File input/output: Difference between revisions
Content added Content deleted
m (→[[Java]]: Fixed up layout slightly.) |
(→[[UNIX Shell]]: Fixed up formatting) |
||
Line 424: | Line 424: | ||
#!/bin/sh |
#!/bin/sh |
||
while read a; do |
while read a; do |
||
echo "$a" |
echo "$a" |
||
done <input.txt >output.txt |
done <input.txt >output.txt |
||
⚫ | |||
#!/bin/sh |
#!/bin/sh |
||
⚫ | |||
cat input.txt >output.txt |
cat input.txt >output.txt |
||
Yet another way, using the 'cp' utility |
|||
#!/bin/sh |
|||
cp input.txt output.txt |
cp input.txt output.txt |