Hello folks,
I have a file that size is over 20GB. if i open in vi it takes ages. i want to add three lines at the top of file and three lines at the end of files. lines are as follows
upper three lines
114444bbbbbb
dddd4544d4cc
rrrr4dddddddd5
at the end of file need to add three lines.
ppppp44ppppp
ttttt55ppeeeep
yyy33pprruuuu
mdangol
September 3, 2010, 11:35am
2
#!/usr/bin/perl
open (FILE, "myfile");
print "114444bbbbbb\n";
print "dddd4544d4cc\n";
print "rrrr4dddddddd5\n";
while (<FILE>)
{
print $_;
}
print "ppppp44ppppp\n";
print "ttttt55ppeeeep\n";
print "yyy33pprruuuu\n";
frans
September 3, 2010, 12:38pm
3
echo "114444bbbbbb
dddd4544d4cc
rrrr4dddddddd5
$(cat file)
ppppp44ppppp
ttttt55ppeeeep
yyy33pprruuuu" >file