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)