Recent Changes - Search:

Oktatás

* Programozás 1
  + feladatsor
  + GitHub oldal

* Szkriptnyelvek
  + feladatsor
  + quick link

Teaching

* Programming 1 (BI)
  ◇ exercises
  ◇ quick link

teaching assets


Félévek

* 2025/26/2
* archívum


Linkek

* kalendárium
* tételsorok
* jegyzetek
* szakdolgozat / PhD
* ösztöndíjak
* certificates
* C lang.
* C#
* D lang.
* Java
* Nim
* Nim2
  + exercises
* XC=BASIC
* old
  ◇C++, ◇Clojure, ◇Scala


[ edit | logout ]
[ sandbox | passwd ]

filter command

Let's write a simple filter command that can be used in a pipeline:

$ cat file.txt | upper

It must print the content of a file in full uppercase.

upper filter
import sys

for line in sys.stdin:
    print(line.upper(), end="")
import std/unicode

for line in stdin.lines:
  echo line.toUpper

The input is processed line by line.

Running example:

$ nim c upper.nim

$ cat upper.nim | ./upper
IMPORT STD/UNICODE

FOR LINE IN STDIN.LINES:
  ECHO LINE.TOUPPER

The Python program works similarly.

Cloud City

  

Blogjaim, hobbi projektjeim

* The Ubuntu Incident
* Python Adventures
* @GitHub
* heroku
* extra
* haladó Python
* YouTube listák


Debrecen | la France


[ edit ]

Edit - History - Print *** Report - Recent Changes - Search
Page last modified on 2026 May 07, 20:35