Roxy
Roxy

Reputation: 127

how to use cut command when string has =

I have a flat file which has condition like this inside password=Y9=hj4jd. I want to cut the display only the value of password so I am using cut command like cut -d = -f2 but it is giving value Y9 only rather than whole value. Can anyone suggest what can be done to modify this?

Upvotes: 1

Views: 122

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799580

Specify the end field.

cut ... -f2-

Upvotes: 6

Related Questions