mySample.sh The above command is printing and killing the temporary process that was created for grep Even though i do not have any process running with Abcd, This is printing pid Any ways to ignore it, iam actually ignoring it using grep -v, still… Any Issue in fetching the process id.? Basic command l…
Tag: linux
Reshuffling of specific structure file with bash script [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 7 years ago. Improve this question I would appreciate your advice on how to deal with the following problem u…
bash does not get root permissions with setuid program
I have the following home-grown implementation of su: To allow for proper execution, the permissions and ownership information are set accordingly: When I invoke a shell, such as /bin/sh, I am able to modify root-owned files and directories: However, /bin/bash doesn’t seem to get root permissions: Answe…
Attempting to send TCP SYN packet with data and RST with data, but raw data field disappears in transit. Why?
I’m attempting to craft a raw TCP packet to send over Ether in a raw socket on a linux client and server. The special part of the TCP packet is that I’m attempting to use the raw data field of the TCP SYN packet and RST packet to send data back and forth (for a proof of concept about an
How to write a swap function in assembly?
I’ve been trying to figure out how to write a x86 GAS swap function for my program. I know its easier to do xchg or just write it C, but I want to be able to write it out anyways. On my 1st midterm we were given this as as swap function: but I receive a segmentation fault when running
My own program who work as “which” command in linux – dont work great
I would like to make my own program who will be work as which command in linux. Original which command works that (example for pwd): $ which pwd /bin/pwd but my program works that: $ ./prog1 pwd /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games pwd Can You correct my pro…
rdesktop request without gui linux
Can I make rdesktop request without installed x-server? Just send RDP request from linux (Centos 6) server to windows server? When I run: the error appears: Solve the problem with install xserver, and freerdp may be it helps someone (centos 6): Answer Yes, you have several options: Use a client that render ov…
Is libpcap implemented by socket API?
libpcap is used for package capturing. As I understand, it can capture the network packages from all ports. And it can capture the package data in link layer (such as ethernet frame). This looks a little confusing to me, because it seems impossible to intercept all network traffic (from all ports) by just usi…
Cross-compilation of cgo (for darwin) fails
I am fairly new to go and even Linux in general. I have built an app in a Linux environment which makes use of a gtk lib based on cgo (https://github.com/mattn/go-gtk/). The application builds fine in its native environment (linux 64bit) but when I try to compile for darwin 64bit I get the following result: T…
Now that Swift is open sourced, can I write and compile iOS apps on a computer that isn’t a Mac?
In the past, it was only possible to compile iOS apps on a Mac. However, Apple has recently open sourced Swift. There are downloads available for the Linux compiler on swift.org. What I am wondering is whether or not this will allow me to write programs for iOS and release them on the app store without a Mac?…