Windows Vista Forums

select-string substitute
  1. #1


    Calin Iaru Guest

    select-string substitute

    Hi,



    for Get-ChildItem, we can use the acronym gci. Is it possible to define
    some custom acronyms for other commands? select-string is widely used and I
    would appreciate a shorter name. The bash shell has a .bashrc folder on Unix
    which is read when starting the shell. Does PS have something similar?

      My System SpecsSystem Spec

  2. #2


    Join Date : May 2008
    Posts : 88
    Vista Home Premium 32bit
    Local Time: 08:22 PM
    italy

     

    Re: select-string substitute

    You can use the command-let set-alias.
    Take a look at this link

    Windows PowerShell Aliases. E.g. gci get-childitem. Also alias for cmd commands

      My System SpecsSystem Spec

  3. #3


    Kryten Guest

    Re: select-string substitute

    Sweet!


      My System SpecsSystem Spec

select-string substitute problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
can I pipe to select-string? Blake PowerShell 2 07 Jul 2008
problems with $var | select-string -pattern $string -q Ben Christian PowerShell 3 08 Feb 2008
Select-String problem Keith Hill [MVP] PowerShell 3 17 Jun 2007
Re: select-string exceptions cmyers PowerShell 0 23 May 2007
select-string to act like grep -v Frank PowerShell 5 12 May 2007