![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| changing IP thru editing files | bluridge | SUN Solaris | 2 | 02-27-2008 12:22 AM |
| the best way of editing .plist files | mehow | OS X (Apple) | 1 | 01-21-2008 03:46 PM |
| Editing files in shell programing | nir_s | Shell Programming and Scripting | 0 | 07-13-2005 01:53 AM |
| Editing one string in multiple files | Skoshi | UNIX for Dummies Questions & Answers | 1 | 11-09-2001 11:13 PM |
| editing unix files on NT | pixelmonkey | UNIX for Dummies Questions & Answers | 1 | 02-01-2001 09:44 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Editing files
hi i would like to know whether i can delete a part of a file in C
for eg. if my file contained 1234567890 and i want to delete 456 so that it becomes 1237890 is there a way i can do this. well, one way i can achieve this is by creating a new file, copy whatever i want, then delete the old file and rename the new file with the name of the old file. but i was wondering whether it can be done in directly, i.e. without doing any copies. plz help regards |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
sed 's/456//' /file > /tmp/file ; mv /tmp/file /file
not C but works fine, but I'm not shure if thats what you want |
|
#3
|
|||
|
|||
|
thats not what i want to do
actually the file is a binary file and say i want to seek 500 bytes in the file and then delete 200bytes from that point. |
|||
| Google The UNIX and Linux Forums |