that's a cool trick with the backslash
|
Author | Content |
---|---|
BernardSwiss Sep 24, 2011 6:49 PM EDT |
I didn't know about that -- is it a relatively new feature? |
tuxchick Sep 24, 2011 7:25 PM EDT |
That's an old bash-ism, Bernard. I knew about it a way long time ago, and then forgot until I read this. Very cool! |
Fettoosh Sep 24, 2011 7:44 PM EDT |
The article makes it look as if it is part of the rm command. I believe it has been part of the bash shell syntax for aliases for a while http://www.cyberciti.biz/faq/ignore-shell-aliases-functions-... [edit: batch => bash] :-) |
mbaehrlxer Sep 24, 2011 9:20 PM EDT |
fettoosh: why do you think that? to me To run the original rm command use “\rm” clearly makes this something not part of rm. indeed an interesting feature, i didn't know about either. i tent to use rm -rf to override the -i which is a bad idea and i always hate doing it. i'll have to remember this one! greetings, eMBee. |
Fettoosh Sep 24, 2011 10:37 PM EDT |
Quoting:fettoosh: why do you think that? Simply because he didn't explain the fact that, in bash shell, the backslash escapes aliases just as it escapes special characters. This is not obvious and not really mentioned in "man bash" documentation. Or simply working too hard on a Saturday. |
abdullah Sep 24, 2011 11:52 PM EDT |
@fettoosh: Thank you for your comment. I've added a line to my article explaining the use of the backslash in bash. |
tuxchick Sep 25, 2011 12:20 AM EDT |
man bash and the Bash Reference Manual don't explain this particular use of the backslash, at least not directly. It may be inferred somewhere, but not in a way I can understand. |
tuxchick Sep 25, 2011 12:21 AM EDT |
Oh, Fettoosh said that. Or there is an echo in here :) |
Fettoosh Sep 25, 2011 12:06 PM EDT |
Quoting:I've added a line to my article Perfect, now your snippet article is twice as valuable by publicizing an obscure bash feature. It comes in very handy when executing batch jobs(non-interactive). [edited: added previous]. Quoting: Fettoosh said that... @tuxchick I did the same with my first comment above. Your comment wasn't there when I started but was when l posted mine 20 minutes after. I was called upon. :-) |
Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]
Becoming a member of LXer is easy and free. Join Us!