Linux Fundamentals Day3 -Text Commands
Brian Kemboi

Brian Kemboi

07 May, 2024

Linux Fundamentals Day3 -Text Commands

stdout (standard out) -uses > which is a redirection operator that allows us to change where the standard output goes. use >> to append without the need to overwrite a file.

stdin(standard in)- uses < operator

stderr(standard error)-

pipe (|)- this symbol allows us to get the stdout fo a command and make that the stdin to another command. less play.txt | grep hello

$ env - the $ symbol followed by $USER or $PATH show s the environment variabales.

cut - it is used to extract portions of text from a file. (-c)this extracts contents by a list of characterss. (- f ) used to extract contents by a field such a s space or symbols like ";"

paste - used to merge lines together. (-s )separates the joined lines by default with tab.

head - used to show the first 10 lines in a file. (-n ) used to specify the number of lines.

tail -lets you see the 10 commands of a file. (-n) is still used to specify number of lines. (-f) is used follow the file as it grows.

expand - convert tabs in afile to spaces.

unexpand- convert spaces in a file back to tabs.

join- join multiple files together by a common field. You can

split- split a file.

sort- useful in sorting lines.

tr(translate) - command is used to translate a set of characters into another set of characters. Such as lower case to fully Uppercase

Brian Kemboi

Brian Kemboi

A software developer interested in 3d modelling

Have any thoughts? Leave a Comment...

Related Posts

Categories