Page 1 of 1

Adding new column to count no. of line in text files?

Posted: 31 Mar 2021 06:46
by devilparada
Is this possible to add a column which can display no. of lines in .txt files in folder?

As for now I am using ws command in terminal on my other Linux system to know no. of line count in each file.

Code: Select all

$ ws -l *.txt

Re: Adding new column to count no. of line in text files?

Posted: 31 Mar 2021 07:50
by highend
Use a custom column with a script?

E.g.

Code: Select all

$wc = "D:\Tools\@Command Line Tools\unxutils\wc.exe";
    return regexmatches(trim(runret("""$wc"" -l ""<cc_item>""")), "^\d+");
http://unxutils.sourceforge.net

Re: Adding new column to count no. of line in text files?

Posted: 03 Apr 2021 18:27
by devilparada
highend wrote: 31 Mar 2021 07:50 Use a custom column with a script?

E.g.

Code: Select all

$wc = "D:\Tools\@Command Line Tools\unxutils\wc.exe";
    return regexmatches(trim(runret("""$wc"" -l ""<cc_item>""")), "^\d+");
http://unxutils.sourceforge.net
Thank You! works
Image