Search Results

Search: Posts Made By: apalex
1,717
Posted By jim mcnamara
So removing "g" would then only replace the first...
So removing "g" would then only replace the first occurrence.
2,544
Posted By ctsgnb
Maybe you should reverse your initial matrix :...
Maybe you should reverse your initial matrix : ....


$cat my
var_Site,SITE-A1,SITE-A2,SITE-A3,SITE-B1,SITE-B2,SITE-C2,SITE-C3,SITE-C4...
2,544
Posted By RudiC
Where is the $var_Host info to be found? ---...
Where is the $var_Host info to be found?

--- Post updated at 17:39 ---

Assuming / inferring you mixed up var_Host and var_Name, how far would this:

awk -F, '
{sub (/var_/, "", $1)
...
5,436
Posted By radoulov
Do you want to remove the last dot as well? ...
Do you want to remove the last dot as well?

sed 's \.[^.]*$ ' infile
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 06:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy