Quote:
Originally Posted by norto
Hoping someone could assist.
I'm hoping to simplify a command that we are using to sniff our network.
Command is
java PacketReporter trace.n 10:15 10:30 > filename
trace.n being a changing value and the times being a changing value.
How can I simplify this without typing the whole line while being able to enter the variables of the trace.n and times?
trace.n is a file with packet information.
|
This is more suitable for a function, in my opinion. In bash you could do
Code:
my_func () {
java PacketReporter "$1" "$2" "$3" > filename
}
Put it in your ~/.bashrc and/or ~/.bash_profile, restart your bash session (i.e. exec bash) and now you should be able to just do
Code:
my_fync trace.n 10:15 10:30