About
Pricing
Community
Teams
Start Free Trial
Log in
SURESH0518
asked on
11/16/2017
How to Replace comma in double quotes Using PowerShell
I have CSV file which has following line
111,222," 1,876,890"
I would like to have output as follows
111,222,1876890
How can I do this in Power Shell?
Powershell
2
1
Last Comment
aikimark
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
oBdA
11/16/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
aikimark
11/17/2017
You can cast the field as a number, rather than doing any string operations.
Example:
PS C:\Users\Mark> [int]" 1,876,890"
1876890
Select all
Open in new window
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Example:
Open in new window