Results 1 to 2 of 2

Thread: bash: !a@m#n$p%c": event not found

  1. #1
    Join Date
    2014-Aug
    Posts
    1

    Question bash: !a@m#n$p%c": event not found

    snmpwalk 192.168.61.253 -c s!a@m#n$p%c

    bash: !a@m#n$p%c: event not found



    snmpcheck -t 192.168.61.253 -c "s!a@m#n$p%c"

    bash: !a@m#n$p%c": event not found


    what's this problem ? anyone can help ?

  2. #2
    The issue is "!' (exclamation point), as you're able todo some cleaver bash fu by using it.

    For example, first command is the 'base' command. Next, we repeat the last command that started with 'echo'. Then the final example is just re-run the last command. (You can go on todo things like run the nth number in your bash history too)
    Code:
    root@kali:~# echo "Hello World"
    Hello World
    root@kali:~# !echo
    echo "Hello World"
    Hello World
    root@kali:~# !!
    echo "Hello World"
    Hello World
    root@kali:~#
    For more examples, see here: http://bash.cyberciti.biz/guide/Reca...ommand_history


    Now, this is the problem you are facing...
    ...and how to fix. There is a difference with single and double quotes.
    Code:
    root@kali:~# echo "!hi"
    bash: !hi: event not found
    root@kali:~# echo '!hi'
    !hi
    root@kali:~#
    Last edited by g0tmi1k; 2014-08-26 at 07:14.
    This is a Kali-Linux support forum - not general IT/infosec help.

    Useful Commands: OS, Networking, Hardware, Wi-Fi
    Troubleshooting: Kali-Linux Installation, Repository, Wi-Fi Cards (Official Docs)
    Hardware: Recommended 802.11 Wireless Cards

    Documentation: http://docs.kali.org/ (Offline PDF version)
    Bugs Reporting & Tool Requests: https://bugs.kali.org/
    Kali Tool List, Versions & Man Pages: https://tools.kali.org/

Similar Threads

  1. Replies: 0
    Last Post: 2020-01-24, 12:20
  2. bash: apt... command not found
    By grimy1928 in forum TroubleShooting Archive
    Replies: 8
    Last Post: 2017-11-11, 16:30
  3. bash: ifconfig: command not found!!!
    By Psycow in forum ARM Archive
    Replies: 2
    Last Post: 2017-05-19, 14:10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •