Mac Keyboard shortcuts: How write a pipe (or backslash) on MacBook

Few shortcuts for my Apple MacBook :

The pipe (|) : (It’s very useful for this command : cat file.log | grep find-string)

Shift + Alt + L

ShiftALTL KEY

For the backslash (\)

Shift + Alt + /

ShiftALTslash

And a link for other KEYBOARD SHORTCUT with description : http://lixlpixel.org/mac-keyboard-shortcuts/

About these ads

27 Responses to Mac Keyboard shortcuts: How write a pipe (or backslash) on MacBook

  1. Etienne says:

    Thanks very much….

  2. Michel says:

    Hey,
    does anybody know why I can’t write a “\” in IDLE on a swiss keyboard. If I press ALT/OPTION + SHIFT + 7, I just get a beep and not a backslash. Does anybody know if that combination clashes with anything else in Python?

    Thanks in advance.

  3. KCL says:

    Same problem … how do you get a “\” on a Swiss keyboard ?

  4. t says:

    Hello,

    Try this:
    (swiss french keyboard)
    for “\” CTRL + ALT + <
    for “|” CTRL + ALT + 7

  5. l says:

    Danish keyboard:
    “|” = Alt+i
    “\” = Alt+Shift+7

  6. N2O says:

    why not buy a PC…?

  7. Gen says:

    On my just purchased macbook pro french swiss keyboard I found that pipe | is ALT 7 and backslash \ is ALT SHIFT 7. In fact ALT gives a lot of missing keys normally found on US QWERTY such as the hash symbol # at ALT 3.

  8. [...] on a mac keyboard Thanks to this link, I’ve found that typing a backslash on a mac keyboard is done by pressing the next three [...]

  9. I think it should be emphasized that this information is for a non-US QWERTY keyboard layout. In US QWERTY keyboard layout there should be a specific key for \ and |, there is no need for the shortcut above and indeed the shortcut will not work.

  10. Drop the pipe, grep supports filename arguments.

    These are identical:
    “cat file.log | grep find-string”
    “grep find-string file.log”

    http://www.partmaps.org/era/unix/award.html

  11. Marauder says:

    Great idea Jeff, but you don’t always do a grep from a file. Could you be from std out.

  12. Marauder says:

    On a danish MAC it is:
    alt + i

    to get the pipe.
    you do need the pipe.
    pipes ftw

    Besides redirecting is much easier than putting stuff into files to work with them.
    just use gawk or grep directly :)

    Cheers

  13. [...] do you type these characters: [] {} = | ? How do you copy and paste ? What are Mac Keyboard Shortcuts [...]

  14. Billy says:

    Using an Englisk (UK) windows keyboard on a Mac, I used the # (hash) key to get a \

  15. Ross Addison says:

    Tried all the options listed for using a ‘backslash’ for inserting the vertical line in the grep command but when I press shift+alt/option L I get this symbol Ò which is really weird. I use a Macbook Pro English language computer. Any ideas would be gratefully received. I’m pulling my hair out (what little is left) trying to fix a printer connection fault. Thanks Ross

  16. emrahatilkan says:

    on turkish keyboard, tried all. “Alt + ?”

  17. Mats says:

    On Swedish Mac alt+7

  18. I have an ISO Spanish keyboard and switched the source input to English. I covered the keyboard with an English keyboard cover to help me remember what goes where. The above did not work for me because I have English as my Input Source.

    Here is what worked to make a pipe:
    Shift +Alt + Ç

    At least it worked once (now I can’t get it to work again… ??¿

  19. Birkanes says:

    İngilizce bilmeyenler için :) Macbook ta nasıl ters slaş yaparım \ sorusuna cevap : Emrah’ın da dediği gibi alt + ? tuşları olacak…

  20. Midnig says:

    On a Swiss keyboard: alt + 7

    Look: |
    :)

  21. Noah says:

    Anyone know what it is on a german mac keyboard? as well as the square brackets?

    Thanks

  22. Erik says:

    shift + alt + 7 for swiss german keyboard

  23. jan says:

    how do i write a @ on a wmware mac installation

  24. iconoclast says:

    With a Belgian French keyboard it is alt + ctrl + >

  25. Lee says:

    On my Mac, using a wireless keyboard with a US layout but with the British – PC layout selected in the settings, I can press the “alt §” key to get the | (pipe) symbol when I using TeamViewer to access my work PC.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: