Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I implement a wrapper script pstrace in bash that changees the interface of

[sudo] strace -c -p [PID]

to

[sudo] pstrace -c -p [PROCESS-NAME]

similar to how

killall [PROCESS-NAME]

is used. With completion and everything.

share|improve this question

killall tabing is handled with bash-completion package at lease on ubuntu. You can see the script at

/etc/bash_completion.d/procps

You'd have to either find a script to drop in that directory or write your own. But for strace the -p is for a pid so not sure how well bash-completion would work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.