![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| 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 03:37 AM |
| How to append to the file? | vinay123 | Shell Programming and Scripting | 9 | 06-16-2008 03:20 PM |
| append file name contents to a target file | gopskrish | UNIX for Dummies Questions & Answers | 2 | 10-27-2006 06: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 10:21 AM |
| Is there any way to append pdf files in UNIX? | cp7800 | Shell Programming and Scripting | 2 | 03-19-2002 10:16 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
|
||||
|
This is homework. Please do not post homework.
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| unix commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|