Hello All,
Could you please provide the solution to my following query
I have some files in my directory. I need to amend the total number of
lines to be added in the starting
line of each file.
For example, please refer the content of the file "file.dat" below.
\h:\w #> cat file.dat
hai
hello
end
Nice day
\h:\w #>
After your command, the output should be below.
\h:\w #> cat file.dat
Total no. of lines: 4
hai
hello
end
Nice day
\h:\w #>
We can do this in
sed and awk through a single command. But we will
avoid the
sed and awk stuff's for some time.
and can just try using simple unix commands for now.
Regards,
Sandeep