/usr/share/doc/libghc-hsh-doc/html/HSH-ShellEquivs.html is in libghc-hsh-doc 2.1.2-7build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>HSH.ShellEquivs</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_HSH-ShellEquivs.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSH-ShellEquivs.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">HSH-2.1.2: Library to mix shell scripting with Haskell programs</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>Copyright (C) 2009 John Goerzen</td></tr><tr><th>License</th><td>GNU LGPL, version 2.1 or above</td></tr><tr><th>Maintainer</th><td>John Goerzen <jgoerzen@complete.org></td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">HSH.ShellEquivs</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Copyright (c) 2006-2009 John Goerzen, jgoerzen@complete.org</p><p>This module provides shell-like commands. Most, but not all, are designed
to be used directly as part of a HSH pipeline. All may be used outside
HSH entirely as well.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:abspath">abspath</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:appendTo">appendTo</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:basename">basename</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:bracketCD">bracketCD</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:catFrom">catFrom</a> :: [<a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a>] -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a></li><li class="src short"><a href="#v:catBytes">catBytes</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a></li><li class="src short"><a href="#v:catBytesFrom">catBytesFrom</a> :: <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a></li><li class="src short"><a href="#v:catTo">catTo</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a></li><li class="src short"><a href="#v:catToFIFO">catToFIFO</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a></li><li class="src short"><a href="#v:cd">cd</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:cut">cut</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:cutR">cutR</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:dirname">dirname</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:discard">discard</a> :: <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a></li><li class="src short"><a href="#v:echo">echo</a> :: <a href="HSH-Channel.html#t:Channelizable">Channelizable</a> a => a -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a></li><li class="src short"><a href="#v:exit">exit</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:glob">glob</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a>]</li><li class="src short"><a href="#v:grep">grep</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:grepV">grepV</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:egrep">egrep</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:egrepV">egrepV</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:joinLines">joinLines</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:lower">lower</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:upper">upper</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:mkdir">mkdir</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FileMode">FileMode</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:numberLines">numberLines</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:pwd">pwd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:readlink">readlink</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:readlinkabs">readlinkabs</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:rev">rev</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:revW">revW</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:setenv">setenv</a> :: <a href="HSH-Command.html#t:ShellCommand">ShellCommand</a> cmd => [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>)] -> cmd -> EnvironCommand cmd</li><li class="src short"><a href="#v:space">space</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:unspace">unspace</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:tac">tac</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:tee">tee</a> :: [<a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a>] -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a></li><li class="src short"><a href="#v:teeFIFO">teeFIFO</a> :: [<a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a>] -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a></li><li class="src short"><a href="#v:tr">tr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:trd">trd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:wcW">wcW</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:wcL">wcL</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li class="src short"><a href="#v:unsetenv">unsetenv</a> :: <a href="HSH-Command.html#t:ShellCommand">ShellCommand</a> cmd => [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> cmd -> EnvironCommand cmd</li><li class="src short"><a href="#v:uniq">uniq</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:abspath" class="def">abspath</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> <a href="src/HSH-ShellEquivs.html#abspath" class="link">Source</a> <a href="#v:abspath" class="selflink">#</a></p><div class="doc"><p>Return the absolute path of the arg. Raises an error if the
computation is impossible. This is a thin wrapper around
System.Path.absNormPath. Unix/Linux users note:
System.Path.absNormPath is known to produce odd results when
a tilde expansion is requested; you might prefer <code><a href="HSH-ShellEquivs.html#v:glob">glob</a></code> to this
function if you know your input is free of wildcards. See
https:/<em>github.com</em>jgoerzen<em>hsh</em>issues/7 for details. </p></div></div><div class="top"><p class="src"><a id="v:appendTo" class="def">appendTo</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/HSH-ShellEquivs.html#appendTo" class="link">Source</a> <a href="#v:appendTo" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="HSH-ShellEquivs.html#v:catTo">catTo</a></code>, but appends to the file. </p></div></div><div class="top"><p class="src"><a id="v:basename" class="def">basename</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> <a href="src/HSH-ShellEquivs.html#basename" class="link">Source</a> <a href="#v:basename" class="selflink">#</a></p><div class="doc"><p>The filename part of a path </p></div></div><div class="top"><p class="src"><a id="v:bracketCD" class="def">bracketCD</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a <a href="src/HSH-ShellEquivs.html#bracketCD" class="link">Source</a> <a href="#v:bracketCD" class="selflink">#</a></p><div class="doc"><p>Changes the current working directory to the given path, executes
the given I/O action, then changes back to the original directory,
even if the I/O action raised an exception.</p><p>This is an alias for the MissingH function System.Path.bracketCWD. </p></div></div><div class="top"><p class="src"><a id="v:catFrom" class="def">catFrom</a> :: [<a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a>] -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a> <a href="src/HSH-ShellEquivs.html#catFrom" class="link">Source</a> <a href="#v:catFrom" class="selflink">#</a></p><div class="doc"><p>Load the specified files and display them, one at a time.</p><p>The special file <code>-</code> means to display the input. If it is not given,
no input is processed at all.</p><p><code>-</code> may be given a maximum of one time.</p><p>See also <code><a href="HSH-ShellEquivs.html#v:catBytes">catBytes</a></code> . </p></div></div><div class="top"><p class="src"><a id="v:catBytes" class="def">catBytes</a> <a href="src/HSH-ShellEquivs.html#catBytes" class="link">Source</a> <a href="#v:catBytes" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Maximum amount of data to transfer</p></td></tr><tr><td class="src">-> <a href="HSH-Channel.html#t:Channel">Channel</a></td><td class="doc"><p>Handle for input</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Copy data from input to output, optionally with a fixed
maximum size, in bytes. Processes data using ByteStrings internally,
so be aware of any possible UTF-8 conversions.</p><p>You may wish to use <code>hSetBuffering h (BlockBuffering Nothing)</code> prior to calling
this function for optimal performance.</p><p>See also <code><a href="HSH-ShellEquivs.html#v:catFrom">catFrom</a></code>, <code><a href="HSH-ShellEquivs.html#v:catBytesFrom">catBytesFrom</a></code> </p></div></div><div class="top"><p class="src"><a id="v:catBytesFrom" class="def">catBytesFrom</a> <a href="src/HSH-ShellEquivs.html#catBytesFrom" class="link">Source</a> <a href="#v:catBytesFrom" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="HSH-Channel.html#t:Channel">Channel</a></td><td class="doc"><p>Handle to read from</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Maximum amount of data to transfer</p></td></tr><tr><td class="src">-> <a href="HSH-Channel.html#t:Channel">Channel</a></td><td class="doc"><p>Handle for input (ignored)</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Generic version of <code><a href="HSH-ShellEquivs.html#v:catBytes">catBytes</a></code>; reads data from specified Channel, and
ignores stdin.</p></div></div><div class="top"><p class="src"><a id="v:catTo" class="def">catTo</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a> <a href="src/HSH-ShellEquivs.html#catTo" class="link">Source</a> <a href="#v:catTo" class="selflink">#</a></p><div class="doc"><p>Takes input, writes it to the specified file, and does not pass it on.
The return value is the empty string. See also <code>catToBS</code>,
<code><a href="HSH-ShellEquivs.html#v:catToFIFO">catToFIFO</a></code> </p></div></div><div class="top"><p class="src"><a id="v:catToFIFO" class="def">catToFIFO</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a> <a href="src/HSH-ShellEquivs.html#catToFIFO" class="link">Source</a> <a href="#v:catToFIFO" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="HSH-ShellEquivs.html#v:catTo">catTo</a></code>, but opens the destination in ReadWriteMode instead of
ReadOnlyMode. Due to an oddity of the Haskell IO system, this is required
when writing to a named pipe (FIFO) even if you will never read from it.</p><p>This call will BLOCK all threads on open until a reader connects.</p><p>This is provided in addition to <code><a href="HSH-ShellEquivs.html#v:catTo">catTo</a></code> because you may want to cat to
something that you do not have permission to read from.</p><p>This function is only available on POSIX platforms.</p><p>See also <code><a href="HSH-ShellEquivs.html#v:catTo">catTo</a></code> </p></div></div><div class="top"><p class="src"><a id="v:cd" class="def">cd</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/HSH-ShellEquivs.html#cd" class="link">Source</a> <a href="#v:cd" class="selflink">#</a></p><div class="doc"><p>An alias for System.Directory.setCurrentDirectory.</p><p>Want to change to a user's home directory? Try this:</p><pre>glob "~jgoerzen" >>= cd . head</pre><p>See also <code><a href="HSH-ShellEquivs.html#v:bracketCD">bracketCD</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:cut" class="def">cut</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/HSH-ShellEquivs.html#cut" class="link">Source</a> <a href="#v:cut" class="selflink">#</a></p><div class="doc"><p>Split a list by a given character and select the nth list.</p><pre>cut ' ' 2 "foo bar baz quux" -> "bar"</pre></div></div><div class="top"><p class="src"><a id="v:cutR" class="def">cutR</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/HSH-ShellEquivs.html#cutR" class="link">Source</a> <a href="#v:cutR" class="selflink">#</a></p><div class="doc"><p>Split a list by a given character and select ranges of the resultant lists.</p><pre>cutR [2..4] ' ' "foo bar baz quux foobar" -> "baz quux foobar"
cutR [1..1000] ' ' "foo bar baz quux foobar" -> "bar baz quux foobar"
cutR [-1000..1000] ' ' "foo bar baz quux foobar" -> "foo bar baz quux foobar"</pre><p>Note that too large and too small indices are essentially ignored.</p></div></div><div class="top"><p class="src"><a id="v:dirname" class="def">dirname</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> <a href="src/HSH-ShellEquivs.html#dirname" class="link">Source</a> <a href="#v:dirname" class="selflink">#</a></p><div class="doc"><p>The directory part of a path </p></div></div><div class="top"><p class="src"><a id="v:discard" class="def">discard</a> :: <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a> <a href="src/HSH-ShellEquivs.html#discard" class="link">Source</a> <a href="#v:discard" class="selflink">#</a></p><div class="doc"><p>Read all input and produce no output. Discards input completely. </p></div></div><div class="top"><p class="src"><a id="v:echo" class="def">echo</a> :: <a href="HSH-Channel.html#t:Channelizable">Channelizable</a> a => a -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a> <a href="src/HSH-ShellEquivs.html#echo" class="link">Source</a> <a href="#v:echo" class="selflink">#</a></p><div class="doc"><p>Takes a string and sends it on as standard output.</p><p>The input to this function is never read.</p><p>You can pass this thing a String, a ByteString, or even a Handle.</p><p>See also <code>echoBS</code>. </p></div></div><div class="top"><p class="src"><a id="v:exit" class="def">exit</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a <a href="src/HSH-ShellEquivs.html#exit" class="link">Source</a> <a href="#v:exit" class="selflink">#</a></p><div class="doc"><p>Exits with the specified error code. 0 indicates no error. </p></div></div><div class="top"><p class="src"><a id="v:glob" class="def">glob</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a>] <a href="src/HSH-ShellEquivs.html#glob" class="link">Source</a> <a href="#v:glob" class="selflink">#</a></p><div class="doc"><p>Takes a pattern. Returns a list of names that match that pattern.
Handles:</p><pre>~username at beginning of file to expand to user's home dir
? matches exactly one character
* matches zero or more characters
[list] matches any character in list
[!list] matches any character not in list</pre><p>The result of a tilde expansion on a nonexistant username is to do no
tilde expansion.</p><p>The tilde with no username equates to the current user.</p><p>Non-tilde expansion is done by the MissingH module System.Path.Glob. </p></div></div><div class="top"><p class="src"><a id="v:grep" class="def">grep</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#grep" class="link">Source</a> <a href="#v:grep" class="selflink">#</a></p><div class="doc"><p>Search for the string in the lines. Return those that match.
Same as:</p><pre>grep needle = filter (isInfixOf needle)</pre></div></div><div class="top"><p class="src"><a id="v:grepV" class="def">grepV</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#grepV" class="link">Source</a> <a href="#v:grepV" class="selflink">#</a></p><div class="doc"><p>Search for the string in the lines. Return those that do NOT match. </p></div></div><div class="top"><p class="src"><a id="v:egrep" class="def">egrep</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#egrep" class="link">Source</a> <a href="#v:egrep" class="selflink">#</a></p><div class="doc"><p>Search for the regexp in the lines. Return those that match. </p></div></div><div class="top"><p class="src"><a id="v:egrepV" class="def">egrepV</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#egrepV" class="link">Source</a> <a href="#v:egrepV" class="selflink">#</a></p><div class="doc"><p>Search for the regexp in the lines. Return those that do NOT match. </p></div></div><div class="top"><p class="src"><a id="v:joinLines" class="def">joinLines</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#joinLines" class="link">Source</a> <a href="#v:joinLines" class="selflink">#</a></p><div class="doc"><p>Join lines of a file</p></div></div><div class="top"><p class="src"><a id="v:lower" class="def">lower</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/HSH-ShellEquivs.html#lower" class="link">Source</a> <a href="#v:lower" class="selflink">#</a></p><div class="doc"><p>Convert a string to all lower case </p></div></div><div class="top"><p class="src"><a id="v:upper" class="def">upper</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/HSH-ShellEquivs.html#upper" class="link">Source</a> <a href="#v:upper" class="selflink">#</a></p><div class="doc"><p>Convert a string to all upper case </p></div></div><div class="top"><p class="src"><a id="v:mkdir" class="def">mkdir</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FileMode">FileMode</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/HSH-ShellEquivs.html#mkdir" class="link">Source</a> <a href="#v:mkdir" class="selflink">#</a></p><div class="doc"><p>Creates the given directory. A value of 0o755 for mode would be typical.</p><p>An alias for System.Posix.Directory.createDirectory.</p><p>The second argument will be ignored on non-POSIX systems. </p></div></div><div class="top"><p class="src"><a id="v:numberLines" class="def">numberLines</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#numberLines" class="link">Source</a> <a href="#v:numberLines" class="selflink">#</a></p><div class="doc"><p>Number each line of a file </p></div></div><div class="top"><p class="src"><a id="v:pwd" class="def">pwd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> <a href="src/HSH-ShellEquivs.html#pwd" class="link">Source</a> <a href="#v:pwd" class="selflink">#</a></p><div class="doc"><p>An alias for System.Directory.getCurrentDirectory. </p></div></div><div class="top"><p class="src"><a id="v:readlink" class="def">readlink</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> <a href="src/HSH-ShellEquivs.html#readlink" class="link">Source</a> <a href="#v:readlink" class="selflink">#</a></p><div class="doc"><p>Return the destination that the given symlink points to.</p><p>An alias for System.Posix.Files.readSymbolicLink</p><p>This function is only available on POSIX platforms. </p></div></div><div class="top"><p class="src"><a id="v:readlinkabs" class="def">readlinkabs</a> :: <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a> <a href="src/HSH-ShellEquivs.html#readlinkabs" class="link">Source</a> <a href="#v:readlinkabs" class="selflink">#</a></p><div class="doc"><p>As <code><a href="HSH-ShellEquivs.html#v:readlink">readlink</a></code>, but turns the result into an absolute path.</p><p>This function is only available on POSIX platforms. </p></div></div><div class="top"><p class="src"><a id="v:rev" class="def">rev</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#rev" class="link">Source</a> <a href="#v:rev" class="selflink">#</a></p><div class="doc"><p>Reverse characters on each line (rev) </p></div></div><div class="top"><p class="src"><a id="v:revW" class="def">revW</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#revW" class="link">Source</a> <a href="#v:revW" class="selflink">#</a></p><div class="doc"><p>Reverse words on each line </p><p>Reverse characters on each line (rev) </p></div></div><div class="top"><p class="src"><a id="v:setenv" class="def">setenv</a> :: <a href="HSH-Command.html#t:ShellCommand">ShellCommand</a> cmd => [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>)] -> cmd -> EnvironCommand cmd <a href="src/HSH-Command.html#setenv" class="link">Source</a> <a href="#v:setenv" class="selflink">#</a></p><div class="doc"><p>Sets an environment variable, replacing an existing one if it exists.</p><p>Here's a sample ghci session to illustrate. First, let's see the defaults for
some variables:</p><pre>Prelude HSH> runIO $ "echo $TERM, $LANG"
xterm, en_US.UTF-8</pre><p>Now, let's set one:</p><pre>Prelude HSH> runIO $ setenv [("TERM", "foo")] $ "echo $TERM, $LANG"
foo, en_US.UTF-8</pre><p>Or two:</p><pre>Prelude HSH> runIO $ setenv [("TERM", "foo")] $ setenv [("LANG", "de_DE.UTF-8")] $ "echo $TERM, $LANG"
foo, de_DE.UTF-8</pre><p>We could also do it easier, like this:</p><pre>Prelude HSH> runIO $ setenv [("TERM", "foo"), ("LANG", "de_DE.UTF-8")] $ "echo $TERM, $LANG"
foo, de_DE.UTF-8</pre><p>It can be combined with unsetenv:</p><pre>Prelude HSH> runIO $ setenv [("TERM", "foo")] $ unsetenv ["LANG"] $ "echo $TERM, $LANG"
foo,</pre><p>And used with pipes:</p><pre>Prelude HSH> runIO $ setenv [("TERM", "foo")] $ "echo $TERM, $LANG" -|- "tr a-z A-Z"
FOO, EN_US.UTF-8</pre><p>See also <code><a href="HSH-ShellEquivs.html#v:unsetenv">unsetenv</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:space" class="def">space</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#space" class="link">Source</a> <a href="#v:space" class="selflink">#</a></p><div class="doc"><p>Double space a file; add an empty line between each line. </p></div></div><div class="top"><p class="src"><a id="v:unspace" class="def">unspace</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#unspace" class="link">Source</a> <a href="#v:unspace" class="selflink">#</a></p><div class="doc"><p>Inverse of double <code><a href="HSH-ShellEquivs.html#v:space">space</a></code>; drop all empty lines. </p></div></div><div class="top"><p class="src"><a id="v:tac" class="def">tac</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#tac" class="link">Source</a> <a href="#v:tac" class="selflink">#</a></p><div class="doc"><p>Reverse lines in a String (like Unix tac).</p><p>Implemented as:</p><pre>tac = reverse</pre><p>See <code><a href="HSH-ShellEquivs.html#v:uniq">uniq</a></code>. </p></div></div><div class="top"><p class="src"><a id="v:tee" class="def">tee</a> :: [<a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a>] -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a> <a href="src/HSH-ShellEquivs.html#tee" class="link">Source</a> <a href="#v:tee" class="selflink">#</a></p><div class="doc"><p>Takes input, writes it to all the specified files, and passes it on.
This function does <em>NOT</em> buffer input.</p><p>See also <code><a href="HSH-ShellEquivs.html#v:catFrom">catFrom</a></code>. </p></div></div><div class="top"><p class="src"><a id="v:teeFIFO" class="def">teeFIFO</a> :: [<a href="file:///usr/share/doc/libghc-missingh-doc/html/System-IO-HVFS.html#t:FilePath">FilePath</a>] -> <a href="HSH-Channel.html#t:Channel">Channel</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="HSH-Channel.html#t:Channel">Channel</a> <a href="src/HSH-ShellEquivs.html#teeFIFO" class="link">Source</a> <a href="#v:teeFIFO" class="selflink">#</a></p><div class="doc"><p>FIFO-safe version of <code><a href="HSH-ShellEquivs.html#v:tee">tee</a></code>.</p><p>This call will BLOCK all threads on open until a reader connects.</p><p>This function is only available on POSIX platforms. </p></div></div><div class="top"><p class="src"><a id="v:tr" class="def">tr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/HSH-ShellEquivs.html#tr" class="link">Source</a> <a href="#v:tr" class="selflink">#</a></p><div class="doc"><p>Translate a character x to y, like:</p><pre>tr 'e' 'f'</pre><p>Or, in sed,</p><pre>y//</pre></div></div><div class="top"><p class="src"><a id="v:trd" class="def">trd</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/HSH-ShellEquivs.html#trd" class="link">Source</a> <a href="#v:trd" class="selflink">#</a></p><div class="doc"><p>Delete specified character in a string. </p></div></div><div class="top"><p class="src"><a id="v:wcW" class="def">wcW</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#wcW" class="link">Source</a> <a href="#v:wcW" class="selflink">#</a></p><div class="doc"><p>Count number of words in a file (like wc -w) </p></div></div><div class="top"><p class="src"><a id="v:wcL" class="def">wcL</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] <a href="src/HSH-ShellEquivs.html#wcL" class="link">Source</a> <a href="#v:wcL" class="selflink">#</a></p><div class="doc"><p>Count number of lines. Like wc -l </p></div></div><div class="top"><p class="src"><a id="v:unsetenv" class="def">unsetenv</a> :: <a href="HSH-Command.html#t:ShellCommand">ShellCommand</a> cmd => [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -> cmd -> EnvironCommand cmd <a href="src/HSH-Command.html#unsetenv" class="link">Source</a> <a href="#v:unsetenv" class="selflink">#</a></p><div class="doc"><p>Removes an environment variable if it exists; does nothing otherwise.</p><p>See also <code><a href="HSH-ShellEquivs.html#v:setenv">setenv</a></code>, which has a more extensive example.</p></div></div><div class="top"><p class="src"><a id="v:uniq" class="def">uniq</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/HSH-ShellEquivs.html#uniq" class="link">Source</a> <a href="#v:uniq" class="selflink">#</a></p><div class="doc"><p>Remove duplicate lines from a file (like Unix uniq).</p><p>Takes a String representing a file or output and plugs it through lines and then nub to uniqify on a line basis. </p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|