Tag Info

Hot answers tagged

6

You installed cygwin, so you can just use its shell for maximum command support : "C:\Program Files\Cygwin\cygwin.bat this will give you a bash shell Then you can change directoty to go to the images location. Suppose your image location is "D:\Your Name\Images", to go there type cd "/cygdrive/d/Your Name/Images" and then call your command using the bash ...


2

Consider this more of an expansion/enhancement to @Slyx's answer. Cygwin has a useful utility cygpath to convert Windows path to *nix-style understood within Cygwin's bash shell: $ cygpath "D:\Path\To\Images" /cygdrive/d/Path/To/Images Instead of the explicit for-loop suggested, you can also consider using find that has better support for filtering ...


2

Simple if the keyword is always in the same column, e.g. column number 2 cut -d, -f 2 file(s) | grep -c 'true' i.e. cut out column 2 (-f 2), using "," as field seperator ( -d, ), get (grep) all trues and count them (-c) more complicated, if we have to search for column "ARD" awk 'BEGIN {FS = ","} ; FNR == 1 { for ( i=1 ; i<=NF ; i++ ) { if ( ...


1

Suppose you have 3 files: new.csv Col1,Col2,ARD,Col4 1,2,true,3 1,2,true,3 1,2,true,3 1,2,false,3 1,2,false,3 1,2,false,3 new1.csv : Col1,Col2,ARD,Col4 1,2,true,3 1,2,true,3 1,2,false,3 1,2,false,3 1,2,false,3 1,2,false,3 new2.csv: Col1,Col2,ARD,Col4 1,2,true,3 1,2,false,3 1,2,false,3 1,2,false,3 1,2,false,3 1,2,false,3 Do: awk -F',' '{print $3}' ...



Only top voted, non community-wiki answers of a minimum length are eligible