{{위키데이터 속성 추적}}
{{소프트웨어 정보
| name = 피시<br />Fish
| logo = Fish shell logo ascii.png
| screenshot = Fish shell 3.3.1 screenshot.png
| screenshot size = 300px
| caption = 피시 셸. 태그라인 "fish - the friendly interactive shell"이 상단에 표시되고 있다.
| author = Axel Liljencrantz
| developer = Fish-shell 개발자들<ref>{{웹 인용| url = https://github.com/fish-shell?tab=members| title = fish shell team members | publisher = GitHub.com| date = | access-date  = 2021-07-28}}</ref>
| released = {{시작 날짜와 나이|df=yes|2005|02|13}}
| latest release version = {{wikidata|property|reference|edit|P348}}
| latest release date = {{시작 날짜와 나이|{{wikidata|qualifier|P348|P577}}|df=yes}}
| programming language = [[C++]]
| operating system = [[유닉스 계열]]
| genre = [[유닉스 셸]]
| license = [[GPL-2.0-only]]<ref>[http://fishshell.com/docs/current/license.html fishshell.com] License for fish</ref>
| website = {{URL|http://fishshell.com}}
}}
'''피시'''(fish)는 상호작용과 사용성에 초점을 둔 [[유닉스 셸]]이다. 피시는 구성보다는 사용자 기능들을 기본으로 제공하도록 설계되었다.<ref>{{웹 인용|url=https://lwn.net/Articles/136232|publisher=[[Linux Weekly News]]|title=Fish - A user-friendly shell|access-date=2010-03-24|date=2005-05-17|author=Liljencrantz, Axel}}</ref> 피시는 이국적인 [[유닉스 셸]]로 간주되는데, [[POSIX]] 셸 표준을 철저히 준수하지 않기 때문이다.<ref>{{웹 인용|url=https://fishshell.com/docs/current/design.html|title=Fish docs: design|access-date=2021-04-09}}</ref>

== 문법 ==
<syntaxhighlight lang="fish">
# Variable assignment, set the variable 'foo' to the
# value 'bar'.  Fish doesn't use the = operator, since
# it is inherently whitespace sensitive.  Also, the set
# command easily extends to work with arrays, scoping, etc.
> set foo bar
> echo $foo
bar

# Command substitution, assign the output of the command
# 'pwd' into the variable 'wd'.  Fish doesn't use ``
# since they can't be nested and look too much like ' '.
> set wd (pwd)
> set wd $(pwd) # since version 3.4
> echo $wd
~

# Array variables. 'A' becomes an array with 5 values:
> set A 3 5 7 9 12
# Array slicing. 'B' becomes the first two elements of 'A':
> set B $A[1 2]
> echo $B
3 5
# You can index with other arrays and even command
# substitution output:
> echo $A[(seq 3)]
3 5 7
# Erase the third and fifth elements of 'A'
> set --erase A[$B]
> echo $A
3 5 9

# for-loop, convert jpegs to pngs
> for i in *.jpg
      convert $i (basename $i .jpg).png
  end
# Semicolons work like newlines:
> for i in *.jpg; convert $i (basename $i .jpg).png; end
# but the multi-line form is comfortable to use because
# fish supports multi-line history and editing.

# while-loop, read lines /etc/passwd and output the fifth
# colon-separated field from the file. This should be
# the user description.
> while read line
      set arr (echo $line|tr : \n)
      echo $arr[5]
  end < /etc/passwd

# String replacement (replacing all i by I)
> string replace -a "i" "I" "Wikipedia"
WIkIpedIa
</syntaxhighlight>

== 같이 보기 ==
* [[유닉스]]
* [[유닉스 셸]]
== 각주 ==
{{각주}}

== 외부 링크 ==
*{{공식 웹사이트}} – containing documentation and downloads
* [https://github.com/fish-shell/fish-shell fish] on [[GitHub]] (active)
* [https://web.archive.org/web/20110726104750/http://gitorious.org/fish-shell/ fish] on [[Gitorious]] (obsolete)
* [http://sourceforge.net/projects/fish/ fish] on [[SourceForge]] (obsolete)
* [https://lists.sourceforge.net/lists/listinfo/fish-users Fish-users] – general discussion list for fish users
* [https://github.com/fish-shell/fish-shell/wiki/Shell-Translation-Dictionary Shell Translation Dictionary] - another Bash/Fish translation table

{{유닉스 셸}}

[[분류:유닉스 셸]]
[[분류:스크립트 언어]]
[[분류:C로 작성된 자유 소프트웨어]]