Solved

!

Posted on 1998-02-19
4
235 Views
Last Modified: 2011-09-20
UNIXer,

What is the usage of "!" ??????

Andrew
0
Comment
Question by:andrewyu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 2008822
In what context?
0
 

Accepted Solution

by:
rams021898 earned 0 total points
ID: 2008823
a) In the sed utility, the "!" is used to match all lines not cvoered in the address.

b) In the awk utility, the "!" is the negation operator.

c) When you type "history", you will get your history list of commands.  Typing "!" and a number will execute that specific command.

or even

d)In ftp, the "!" command tells ftp that you want to run a shell comman on your local host (like "!ls").

I think that's most, if not all of its uses.

Hope this helped....
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2008824
In a couple of apps (rams still mentioned ftp) it is the shell escape (ex, ed, vi, etc.).
rams, in c) you asume csh, tcsh or something similar ;-)

0
 
LVL 3

Expert Comment

by:braveheart
ID: 2008825
! is also often a history operator in debuggers and similar applications. In the csh, it is also a negation operator. I'll bet that we haven't exhausted all the possibilities yet.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question