The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
11 views

Where are custom functions located

When I in Ubuntu runs the mario(){echo "Sorry, Mario is in another castle";} in the console, where does this gets saved, and how do I remove the function mario?
0
votes
0answers
11 views

Some libxbgi in Ubuntu [closed]

I know bgi is really old, but I'd still like to use it till I learn something new. The page http://libxbgi.sourceforge.net/ was quite helpful, and I installed the header file in my Ubuntu. But it ...
1
vote
1answer
34 views

How to enter part of a command automatically, after another command executed?

I want to create a function for grep-ing my command line history by history | grep {keyword}. And after seeing the list and choosing the command by line number ,I want to execute it by !{line_number} ...
-1
votes
1answer
24 views

Is there an analogous command to `which` for shell functions? (or how to know how an function ended being callable up in my shell)

I'm working with Virtualenv, which i found out (after a few google searches) that it creates a shell function called deactivate in my shell. By looking through the package's files i found how it does ...
11
votes
7answers
1k views

How to make the argument as optional in bash function?

In have this function with 9 arguments: SUM() { echo "The sum is $(($1+$2+$3+$4+$5+$6+$7+$8+$9))" } And I want to make the second arguments to the next(3..9) become a optional arguments. When ...
0
votes
1answer
18 views

Backup function

I am attempting to make a function that you provide it a file name, it then make a back up of the file and slaps on a time stamp to mark the file. Once it time stamps the file it prints out all files ...
-1
votes
1answer
76 views

How can I select all untagged photos in Shotwell?

I would like to be able, to select all untagged and tagged photos in Shotwell separately, so that I may tag and re-tag them. How can I do this?
3
votes
2answers
3k views

Num Lock function has changed after upgrading to UBUNTU 13.10 [duplicate]

I faced a strange function I installed ubuntu 13.10 and all the time the number pad on the right of my keyboard is typing number without pressing Num Lock and when I turn it on It does the job when ...
2
votes
2answers
378 views

Where can I put a user-defined terminal function?

I am planning to create a function that would simplify things for me. The function would be something like function lazymode() { echo "Hello World!"; } so that when I use the command lazymode in ...
1
vote
2answers
300 views

How to get original system command after overwriting it with a function?

I'm at a Hackathon right now so if someone would answer this soon, you'd be doing me a huge favor. I've written a function called ls() in my .bashrc that looks like this: ls() { if(some ...
5
votes
2answers
4k views

How to protecting cd command to deal with parentheses?

I asked here how to make cd protect spaces. Tab completion is great, but sometimes you paste the path from the clipboard so this is useful. The solution breaks with parentheses however. No matter how ...
3
votes
1answer
237 views

Saw an interesting command but can't alias it

Saw an command from this post http://askubuntu.com/a/266839/75967 that I would like to alias find {,/usr}/{,s}bin -printf '%f\0' | xargs -0 whatis | sort | less I assume the less or the | is ...
1
vote
1answer
99 views

Extending postgresql code

In postgresql source code there is a file called postgres.c precisely in /src/backend/tcop/. Inside there is a function called exec_simple_query. I want add a line that call my_function that is in ...
3
votes
0answers
96 views

When I'm on the desktop and I type anything a small window opens. What is it? [duplicate]

Possible Duplicate: What is the text box on the desktop for? When I'm on the desktop of Ubuntu, I type something and it appears in a small window in the lower right corner of the screen. ...
4
votes
2answers
79 views

How do you print/recall the definition of a function in bash

I can define and print the contents of variable called my_var like this: my_var="hello" echo $my_var but if I define: my_funct {echo "hello";} how can I recall my function's definition later on? ...
2
votes
2answers
227 views

How to bind multiple commands

We all have to use ls |more and also some other commands. So i just need info is there a way to bind multiple commands together like I want to bind ls|more together.So when i simply pass ls command ...
3
votes
2answers
150 views

Batch Starting Servers

How I can create a batch alias for bash? I need to do this: cd /somefolder bundle exec unicorn -p 3000 rackup faye.ru -s thin -E production bundle and rackup - this is 2 servers for example I ...