Glam Prestige Journal

Bright entertainment trends with youth appeal.

I am trying to run this command line on Windows (I've installed GNU coreutils 8.24)

echo android:versionCode="3267" | cut -d \" -f 2

Expected output:3267

However, I am getting error:

cut: the delimiter must be a single character

Anyone know how can I use cut command to extract 3267 from android:versionCode="3267" ?

1 Answer

How can I use cut to extract 3267 from android:versionCode="3267"?

You need to escape the first pair of "s:

$ echo android\:versionCode=\"3267\" | cut -d \" -f 2
3267
$

(tested in Cywin bash)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy