- winux is a partial synchronous clone of commands available in bash but not in windows.
It reads data from the file and gives their content as output. It helps us to create, view, concatenate files.
wincat filename
It will show content of given filename
wincat file1 file2
This will show the content of file1 and file2.
wincat -s test1.txt
Will suppress repeated empty lines in output
wincat -n filename
It will show content with line number
example:- wincat -n test1.txt
1 my name is saurabh
2 I'm a web developer
wincat -b filename
It will show content with line numbers to non-empty lines only.
example:- wincat -b test2.txt
1 this is the content of test2 file.
2 It contains lots of data.
wincat > newfile
Will create and a file named newfile
wincat [filename-whose-contents-is-to-be-copied] > [destination-filename]
The content will be copied in destination file
wincat file1 >> file2
Will append the contents of one file to the end of another file
wincat *.txt
Will show the content of all text files present in the folder.
It is used to find out number of lines, word count, characters count in the files specified in the file arguments. By default it displays four-columnar output. First column shows number of lines present in a file specified, second column shows number of words present in the file, third column shows number of characters present in file and fourth column itself is the file name which are given as argument.
winwc [OPTION]... [FILE]...
winwc filename
Passing only one file name in the argument.
$wc state.txt
5 7 63 state.txt
Passing more than one file name in the argument.
$ wc state.txt capital.txt
5 7 63 state.txt
5 5 45 capital.txt
10 12 108 total
Note : When more than file name is specified in argument then command will display four-columnar output for all individual files plus one extra row displaying total number of lines, words and characters of all the files specified in argument, followed by keyword total.
winwc -l filename
winwc -w filename
winwc -m filename
winwc -L filename
The wingrep filter searches a file for a particular pattern of characters, and displays all lines that contain that pattern. The pattern that is searched in the file is referred to as the regular expression (grep stands for globally search for regular expression and print out).
wingrep [options] pattern [files]
Consider the below file as an input.
wincat > file.txt
unix is great os. unix is opensource. unix is free os.
learn operating system.
Unix linux which one you choose.
uNix is easy to learn.unix is a multiuser os.Learn unix .unix is a powerful.
wingrep -i pattern filename
wingrep -i "UNix" file.txt
unix is great os. unix is opensource. unix is free os.
Unix linux which one you choose.
uNix is easy to learn.unix is a multiuser os.Learn unix .unix is a powerful.
wingrep -w pattern filename
wingrep -w "unix" file.txt
unix is great os. unix is opensource. unix is free os.
uNix is easy to learn.unix is a multiuser os.Learn unix .unix is a powerful.
wingrep -c pattern filename
wingrep -c "unix" file.txt
2
wingrep -n pattern filename
wingrep -n "unix" file.txt
1 unix is great os. unix is opensource. unix is free os.
2 uNix is easy to learn.unix is a multiuser os.Learn unix .unix is a powerful.
wingrep ^pattern filename
wingrep "^unix" file.txt
unix is great os. unix is opensource. unix is free os.
wingrep pattern$ filename
wingrep "os.$" file.txt
unix is great os. unix is opensource. unix is free os.