Image

Imagecrasherkiddy wrote in Imagelinux 😡irritated

Listens: Supergrass - In It For The Money

deleting one line within awk.

More problems on the shell scripting and awk front. Basically i have an index files on all deleted files (in the following format)...

13 /home/bob/bobsfile
14 /home/fred/fredsfile
16 /home/mat/matsfile

Now getting the values and restoring the file isn't the problem it updating this index file. Within the awk script that restores the file is a printf command that pipes another awk command to the shell, its this awk command that is meant to delete the line within the index file of the file that has just been restored (e.g. i restore bobsfile from the file named 13 to /home/bob/bobsfile) then i have to delete the line 13 /home/bob/bobsfile its this i'm having a problem with. I'm using the following awk command (within the printf) to get the exact value of the line i need to (e.g. 13 /home/bob/bobsfile) but the problem is i can't delete it from the file, simply because i don't know how!! I've looked everywhere and can't seem to find how to do it :(