A one-liner is textual input to the command-line of an operating system shell that performs some function in just one line of input. The one liner can be An expression written in the language of the shell. The invocation of an interpreter together with program source for the interpreter to run. The invocation of a compiler together with source to compile and instructions for executing the compiled program.

PropertyValue
dbpprop:abstract
  • A one-liner is textual input to the command-line of an operating system shell that performs some function in just one line of input. The one liner can be An expression written in the language of the shell. The invocation of an interpreter together with program source for the interpreter to run. The invocation of a compiler together with source to compile and instructions for executing the compiled program. Certain dynamic scripting languages such as AWK, sed, and perl have traditionally been adept at expressing one-liners. Specialist shell interpreters such as these Unix shells or the Windows PowerShell, allow for the construction of powerful one-liners. The use of the phrase one-liner has been widened to also include program-source for any language that does something useful in one line.
  • Un uniligne est généralement un programme informatique jetable, mais peu banal, écrit pour une tâche ponctuelle en un langage de script tel que Perl ou Ruby, et tenant sur une seule ligne. Des langages qui imposent plusieurs phases avant l'exécution, la déclaration explicite de variables, de fonctions ou, pire, de classes, ne se prêtent pas aux unilignes. Les unilignes exploitent typiquement les qualités DWIM (Do What I Mean) d'un langage. Parce qu'un uniligne est rarement destiné à être réutilisé, les considérations de lisibilité par un tiers sont secondaires. Certains unilignes sont des assombrissements délibérés.
  • 單行小程式是用不多於一行寫成的電腦程序或表達式。它常用作顯示程式語言在不同範疇的表達能力。實際上,單行小程式將被輸入和將被執行直接地從命令線。Perl是一種優秀語言使用來創造單行小程式。許多單行小程式是實用的,例如,以下perl單行小程式將扭轉所有位元組在文件: perl -0777e 'print scalar reverse <>' filename 單行小程式也用作顯示其他電腦程式的表達。單行小程式使用頻繁來展示編程的能力。比賽經常舉行看誰可能創造最好的單行小程式。 99個瓶啤酒電腦程式單行小程式的例子: perl -e '$b="of beer";$w="on the wall";print "$_ ",b($_)," $b $w\n$_ ",b($_)," $b\ntake one down, pass it around, ",$_-1," ",b($_-1)," $b $w\n\n" foreach (reverse 1..99);sub b{$x="bottle";$_[0]==1?$x:$x. "s";}' 一個剪刀石頭布遊戲單行小程式: perl -e '$c=(=qw|rock scissors paper|)[(int rand 3)];$|=0;until($y=~/^$/){print "$r, $s or $p? ";$y=<>;chop $y};%r=($s,{$p,1,$r,0},$p,{$r,1,$s,0},$r,{$s,1,$p,0});print "You: $y\nCom: $c\nYou ".(. "\n")' Perl不是唯一一個能運行單行小程式的電腦程式。以下是C程式去顯示ASCII代碼的鑰匙輸入: void main(void) {int c; while(c = getchar) printf("%d %02X\n", c, c);}
dbpprop:hasPhotoCollection
dbpprop:reference
rdfs:comment
  • A one-liner is textual input to the command-line of an operating system shell that performs some function in just one line of input. The one liner can be An expression written in the language of the shell. The invocation of an interpreter together with program source for the interpreter to run. The invocation of a compiler together with source to compile and instructions for executing the compiled program.
  • Un uniligne est généralement un programme informatique jetable, mais peu banal, écrit pour une tâche ponctuelle en un langage de script tel que Perl ou Ruby, et tenant sur une seule ligne. Des langages qui imposent plusieurs phases avant l'exécution, la déclaration explicite de variables, de fonctions ou, pire, de classes, ne se prêtent pas aux unilignes. Les unilignes exploitent typiquement les qualités DWIM (Do What I Mean) d'un langage.
rdfs:label
  • One-liner program
  • Uniligne
  • 單行小程式
owl:sameAs
skos:subject
foaf:page