Results 1 to 4 of 4
Let's consider the PATH variable is defined as:
Code:
PATH=.;C:\Program Files\MKS Toolkit\mksnt;e:\zip_v\bin;e:\sthakkar\vod_vp1\lib
My objective is to remove the mksnt path if found in PATH variable. That means PATH should look ...
- 10-06-2008 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 59
grep a string from PATH variable and then remove that string/path
Let's consider the PATH variable is defined as:
My objective is to remove the mksnt path if found in PATH variable. That means PATH should look like this:Code:PATH=.;C:\Program Files\MKS Toolkit\mksnt;e:\zip_v\bin;e:\sthakkar\vod_vp1\lib
How do I do it using sed, awk, cut?Code:PATH=.;e:\zip_v\bin;e:\sthakkar\vod_vp1\lib
- 10-06-2008 #2Just Joined!
- Join Date
- Apr 2007
- Posts
- 59
I tried making use of field separator of awk but no luck..
- 10-06-2008 #3Linux Newbie
- Join Date
- Jul 2008
- Posts
- 181
Code:sed 's/[^;]\+mksnt;//'
- 10-06-2008 #4Just Joined!
- Join Date
- Apr 2007
- Posts
- 59
Thanks! it works fine..


Reply With Quote