I am probably just having a brain fart, but I can not for the life of me figure out how to loop through an array in shell script, not bash. Im sure the answer is on stackoverflow somewhere already, but I can not find a method of doing so without using bash. For my embedded target system bash is not
Tag: linux
Installed .desktop file to have user’s home directory path inserted
Wording the title was a little tricky, but here’s the situation. I am making a install.sh file for my game which is written in Python. I am trying to create a game folder with all assets instead of making this a module for Python. I may be doing things the hard way, but this method seems to work well. T…
How to set GCC_COLORS in gcc4.9 to emit colorizing diagnostics messages?
gcc4.9 supports the colorizing diagnostics for compiler warning/error messages. We can enable it for a particular program using the option “fdiagnostics-color”. Currently I am using gcc4.9.1 and I append this particular option in my makefile as follows: If I compile a *.cpp file a get the followin…
create a symbolic link to multiple directory centos [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
Why does SetSUID not work for shell script?
I am trying to create a executor program for regular users on linux with SUID bit set so whatever commands, passed to the program as parameters, get executed with root permission. However when I try to implement this as a bash script, this does not work, where it works when implemented in C. I want to know wh…
Xlib: Adding a window to the save-set using XAddToChangeSet does not work from Java/JNI
I am getting stuck and don’t know where to look further. I have a Java application and one of its functionality is to grab some specific windows (ie third party application windows) and host them within itself (with some extra frames, etc…) The whole thing works great, except when my Java applicat…
Is it possible to copy files from local windows directory to remote linux directory?
I am using ssh on a remote linux machine from my desktop using putty. I want to copy a txt file which is in the desktop of my local windows machine to the remote linux directory. How can i do that using shell when i am logged in to remote machine using ssh? Thanks for the help! Answer Yes it
Retrieve path of symbolic link
I want to store the path of the file the symbolic link is pointing to into bufff. This works with my current implementation using readlink but it grabs extra data I don’t need because my bufsize is arbitrarily valued. I’m not sure how to size it according to the path of what the symbolic link poin…
How to make z= look like ctrl-x s in vim spell check
So in insert mode if you hit ctrl-x s on a misspelled word you get a nicely formatted popup menu of spelling suggestions. This is awesome. The comparable command in normal mode (z=), however, gives a bland plain-text list that eats the whole screen. I’ve partially solved this by adding the following key…
Linux kernel : logging to a specific file
I am trying to edit the linux kernel. I want some information to be written out to a file as a part of the debugging process. I have read about the printk function. But i would like to add text to a particular file (file other from the default files that keep debug logs). To cut it short: I would