Search Results

Search: Posts Made By: apalex
1,789
Posted By jim mcnamara
So removing "g" would then only replace the first...
So removing "g" would then only replace the first occurrence.
2,639
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,639
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,449
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 12:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy