![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trying to empty file using > but the file size increasing when next append | firdousamir | UNIX for Dummies Questions & Answers | 4 | 06-23-2008 12:37 AM |
| How to append to the file? | vinay123 | Shell Programming and Scripting | 9 | 06-16-2008 12:20 PM |
| append file name contents to a target file | gopskrish | UNIX for Dummies Questions & Answers | 2 | 10-27-2006 03:18 AM |
| Append a field to the end of each line of a file based on searching another file. | ultimate | Shell Programming and Scripting | 2 | 03-29-2005 07:21 AM |
| Is there any way to append pdf files in UNIX? | cp7800 | Shell Programming and Scripting | 2 | 03-19-2002 07:16 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Append the file in UNIX
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
This is homework. Please do not post homework.
|
|||
| Google The UNIX and Linux Forums |