I have the following commands. Wherever the .user.log file is present, we need to print the parent directories (i.e hht and wee1.) How can this be done? Answer Am I missing something here. Surely all this regex and/or looping is not necessary, a one-liner will do the job. Also “for foo in $()” solutions will fail when there are spaces
Tag: command
capture network traffic on two different ports simultaneously
I wish to capture tcpdump traffic on two different ports simultaneouly . I tried this .. Althoug it worked but problem is first it will wait for traffic on port 21 and when interrupted then it will wait for port 22. Also another problem is it will not capture the traffic on port 22 untill traffic on port 21 will
How can I recall the argument of the previous bash command?
Is there a way in Bash to recall the argument of the previous command? I usually do vi file.c followed by gcc file.c. Is there a way in Bash to recall the argument of the previous command? Answer You can use $_ or !$ to recall the last argument of the previous command. Also Alt + . can be used