|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
File manipulation
I Have a file which has the structure as
filesystemname %usage %left Flag /tmp 87 13 1 /tmp/kir 24 76 0 /tmp/kra 50 50 1 /tmp/kir/vin 23 77 2 I need to manipulate only the flag value. i.e., I should be able to change only the flag value. If i do need to change the flag under /tmp/kra how can I do that with out changing the other variables. |
|
#2
|
|||
|
|||
|
# changes '1' to '1000'
sed -e '/\/tmp\/kra /s/[^ ][^ ]*$/1000/g' file.txt |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > File manipulation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|