Programming :: Make A Bash Script Start Automaticly When System Restart?

Apr 4, 2009

ia have this script
#!/bin/bash
if [ -e /tmp/mysql.pipe ]; then

[code]...

View 3 Replies


ADVERTISEMENT

General :: Start Script Bash When System Start Stop Reeboot?

Dec 10, 2009

I have 3 script BASH. I want start this script when the system start,stop and reeboot.

View 4 Replies View Related

Ubuntu :: Restart The System To Make It Work?

May 15, 2011

I have dell xps 14 laptop sometimes sound gets choppy it get started breaking in middle of playing music then i need to restart the system to make it work. how to solve this without restarting? i m using ubuntu 10.10

View 4 Replies View Related

Ubuntu :: Re-map Touchpad Corners And Make It Permanent ( Even After System Restart )?

Feb 14, 2011

just can't find the answer for this one (after Google and these forums) So I want to configure my Synaptics touchpad in this fashion:

Code:
synclient RTCornerButton=8 RBCornerButton=10 LTCornerButton=11 LBCornerButton=12 FastTaps=1 This line of code does what it's intended of it. However, the changes made don't really stick after a system reboot.I'll explain:

So, the "FastTaps" part works flawlessly (as intended). However, the corners bit doesn't work after system reboot!...and weird enough, if I set up a start up script with that bit of code on it it'll only remap the last two corners (LT and LB), because RT and RB always get automatically set to "2" and "3". It's obvious then that those corners are getting remaped somewhere I haven't found yet. I've already tried ppa:yurivkhan/ppa and adding new options to "usr/lib/X11/xorg.conf.d/10-synaptics.conf" to no avail either. how to make the remap of touchpad corners permanent? P.S. - I'm using Ubuntu 10.04 LTS with Macbuntu.

View 3 Replies View Related

Programming :: Script To Check Startup For Start Restart Stop Centos?

Jun 16, 2010

I have startup scriptsI want to test themI need a script to do the followingstart restart stop for 100 times (or i can set how many cycle)

View 1 Replies View Related

OpenSUSE Install :: Configure The System To Automaticly Change Wallpaper And The Standard Icon Theme To A Custom Made?

Apr 8, 2010

How do you configure the system to automaticly change wallpaper and the standard Icon Theme to a custom made.

-If Im not mistaken, it must be something to do with the option to make a script at the end of the installation, -Ive seen the option in the creation,

View 4 Replies View Related

Programming :: Make Bash Replace The Value Of A Variable?

Apr 18, 2009

I have a program I am writing where I have a for loop and I want to make it substitute the variable twice like:

for ((i=0;i<5;i++)) do
echo $"$i"
done

[code]...

View 3 Replies View Related

Programming :: Make A Automated Build-script With Bash?

Apr 14, 2010

I'm trying to make a automated build-script with bash but i keep getting different errors that I can't seem to figure out. Could anyone please tell me what's wrong with this package of build-scripts? I'm posting the main build-script and attaching the rest of the scripts in a compressed form. The errors mainly comes from the scripts in "/first_installation/usr/share/siem-live/init"

[Code]...

View 2 Replies View Related

Programming :: Bash Script - Make Sure All Files Have Certain Permissions

Jan 14, 2011

How can I iterate over all the files in the current directory to check for certain permissions? This is what I have:

Code: #!/bin/bash
for file in *.tar.gz
do if [ -r "$file" ]
then echo "$file is readable"
else echo "$file is NOT readable"
fi done

But this only checks that the current user has read permissions for each file. I want to check that the group "others" has read permissions for each file. How can I do this? Is there a built in function to check if a file has read permissions for the "others" group? Otherwise, I thought I might be able to use this:
Code: $ stat --format=%a file
744 And parse the output "744" and make sure the 3rd number is between 4 and 7 (since the octals 4-7 have read permissions for others).

View 2 Replies View Related

Programming :: Bash : How To Make Firefox Open But Minimize

May 3, 2011

I am relatively new to scripting, but I was wanting to open a firefox window from a bash script, but have it open, then minimize. In the script, I have a single instance of: firefox & but is there a way to minimize it, versus have it displayed on the screen? I was wanting the command terminal to remain visible and it can't since the firefox window is open in front of it. I looked all over the place, including the man pages, but to no avail. I can make the height and width changes, but no minimize. Either that, or to be able to bring the terminal window back to the front automatically.

View 5 Replies View Related

Programming :: Make An Automated Build-script With Bash

Apr 14, 2010

I'm trying to make a automated build-script with bash but I keep getting different errors that I cant't seem to solve for various reasons. what's wrong with this build-script? I'm posing the main build-script and attaching the rest of the scripts in a compressed form. Buld-script link: [URL]

[Code]....

View 3 Replies View Related

Programming :: Make 2 Separate Arguments In 1 Bash Script?

Aug 31, 2010

This is what I have:

Code:
#!/bin/bash
#ascript.sh

[code]...

View 8 Replies View Related

Programming :: Make A Flawless Bash Alarm Script

Jan 12, 2011

I am not positive that this is the right subforum for this post. It is technically a programming question but I am not sure if this is the best place for bash scripting questions. Anyhow, I have been having trouble getting up in the morning. I am a pretty good morning person and once I am up, I am good to go. The problem is getting out of bed. Traditional alarms have just not cut it in the past; there is always an easy way to shut them off and go back to sleep.

Recentliesh, I decided to try to make an alarm script in bash that would be more successful in getting my lazy behind out of bed. I am a newbie bash scripter at best so my attempts have been very simple but have not cut it so far. Here are some examples:

[Code]....

The above script was the version of my bash alarm. It will not stop ringing until I input that ridiculous phrase. The big issue with this script was that I would input the phrase quickly and go back to sleep. It was however, much more successful than traditional alarm clocks. Another obvious pitfall was that even though control-c'ing the process would not work, the terminal could be closed and that would be the end of it. I'll get back to that issue. Here is my second attempt:

[Code]....

View 7 Replies View Related

General :: Make Simple Website In System Using Bash Scripting?

Apr 3, 2011

How to made a simple website in linux using bash scripting.

View 3 Replies View Related

Programming :: Bash Script To Start Gnome Terminal?

Apr 8, 2010

I want to write a bash script which can open a new gnome-terminal window.
In that gnome-terminal window, it should goto a specific directory and edit a file using Vi Editor.

How is it possible to do that?

View 7 Replies View Related

Programming :: Write A Bash Script That Will Make Some Web Stats Reports

Jun 23, 2010

I'm planing to write a bash script that will make some web stats reports and I'm stuck on beginning because I don't know how can I read a directory content, put everything in a variable, compare the variable value with current date and go further.More specific ...

I have /var/apache/log/. Here I have access logs on date ( like access.log.24.06.2010.gz and so on ).

How can I do to automatically zgrep (in a bash script) last day .gz ??

View 3 Replies View Related

Programming :: Bash Script To Restart A Dead Script?

Jul 22, 2011

I have a social web application built with php and I have a php script which should run in the back ground and not stop (although it does from time to time).I am wanting to write a bash script which will fire every minute to check if my php scrip is running, and if its not running then I need it to start it again.I have the following but it doesn't work, it just keeps restarting it.

Code:
TEST = `pidof -x php /var/www/html/app/index.php | wc -w`
if [ $( pidof -x php /var/www/html/app/index.php | wc -w ) -eq 0 ];

[code]...

View 9 Replies View Related

Programming :: Bash - Ps - Psgrep And Read /proc/$pid Make Script Exit

Mar 22, 2011

I have not been able to write bash to use a PID file to ensure no other instance of the same script is running! All three methods I can think of to see if the PID in the PID file is another instance of the script make the script exit with a return code of 1 but the same commands run at the command prompt work as expected.

The first attempt was:

Code:

The first attempted workaround was:

Code:

The second attempted workaround (with debug to make the following command prompt copy and paste meaningful) was:

Code:

Here's the command prompt session, testing with a stale PID file and then manually running the problem command and it behaving as expected:

Code:

This on Slackware64 13.1 which has bash 4.1.7.

In desperation I tried rebooting but the behaviour was the same.

View 2 Replies View Related

Programming :: Make A Bash Script That Will Open Up Port 23 For A Netcat Connection?

Apr 14, 2009

I'm starting to like making bash scripts. It's kewl making creative ones. Right now I'm trying to make a bash script that will open up port 23 for a netcat connection. Once there's a connection, I'd like for the script to open up xmms and play a sound effect, as well as echo a txt file to the desktop saying that a connection was made at this specific time. When I execute the script, it stops exection at the first line. So far I have this:

sudo nc -lvnp 23
while [ 1 ]
do

[code]...

View 8 Replies View Related

Programming :: Bash: Rename Files In Alphabetical Order And Make Extensions Uppercase?

Oct 21, 2010

I am trying to write a bash script that will extract a .cbr (.rar) file, traverse the extracted files in alphabetical order and rename them 001.JPG, 002.JPG, 003.JPG, etc.So far I only have this much to extract it:

Code:
#!/bin/bash
#

[code]....

View 8 Replies View Related

Programming :: Bash - Automatically Build A Set Of Packages And Redirect Output Into Logs - Failed Make Should Return A Non-zero Value

Jun 27, 2011

I have a set of bash scripts that I'm running that automatically build a set of packages for me and redirect their output into logs. Basically, I have a bunch of lines that are something like this: ${CONFIGURE_DIR}/configure &> ${LOG_DIR}/log or cd ${CONFIGURE_DIR} && make &> ${LOG_DIR}/log, etc.

This is supposed to make the entire process silent. However, sometimes with some packages some output leaks to my console (either stdout or stderr). I'm thinking that maybe the configure scripts/make are executing commands within new shell instances that don't inherit my redirect, or something to that effect.

Another reason for thinking this is that in another part of my script I detect errors when running make by testing with "if [ $? -ne 0 ]", and if the redirect leaks to my console and also the leaked output indicates that the build failed ("make: Error" and so on), then my $? test fails (i.e., it thinks that $? == 0, whereas a failed make should return a non-zero value). It's as if my original script can't "see" the results from child commands executed from later scripts.

View 1 Replies View Related

Ubuntu Installation :: System Automatically Tried To Restart But On The Restart Got The 'terminal' View

Apr 30, 2011

I have just finished the upgrade of the latest version and I'm at the point of my system restating.

My system automatically tried to restart but on the restart I got the 'terminal' view. It stopped when asking for my username (it never normally asks for this before the grub menu) and then password. I didn't get any further than that.

I now have on my screen (still in the terminal view before the grub menu)

"name@name-desktop:...$ "

I'm on my phone now so I don't actually have the symbol for before the dollar sign but your know what it is. The raised S on a 90 degree angle.

View 6 Replies View Related

Programming :: Assigning Bash Variable With The System Command In Awk?

Mar 1, 2011

I am having all sorts of trouble trying to assign a variable within an awk script with the system command. I know there is a lot of ways around this problem, but for efficiency reasons, I would like to, within my awk script, do something like

system(x=3)

or

system(x=NR)

and, latter on the shell script which calls the awk script, use the variable $x. But nothing is passed to x. I have already tried things like

command = "x=3"
system(command)

and also used a pipeline within the system to pipe it to /bin/sh In fact tried a lot of stuff like that, using $(( )) etc etc etc I can create directories e write to files (yes, i could write to a file and read from there, but I dont think it is efficient, plus I am puzzled).

View 7 Replies View Related

Ubuntu :: Make The Pc Start On Windows Auto, Without Prompting By Showing The Choose System Screen?

Mar 24, 2011

I recently installed Ubuntu in my PC, without uninstalling windows coz it`s not really mine, its my father`s. When he saw the boot (like a month later, he REALLY uses the PC...) he went crazy and instantly ordered me to "uninstall that thing". Of course i`m not stupid to do that after a month of seeing how Ubuntu is... I want to know if/how can I make the pc start on windows auto, without prompting by showing the choose system screen, and when i open boot menu (i don`t remember, but i think its F-eight) i have both choices, so I can keep Linux without him knowing.

View 3 Replies View Related

Programming :: Write A Bash Script Program In System Command Terminal?

Mar 22, 2010

I'm trying to write a bash script program in the Linux command terminal that will write to a fellow user and then continue reading down the program. this is what i have (kind of explains the idea too):

#!/bin/sh

clear
echo "this is before the write command"
write jcummins
this message should go to jerry
echo "the message didn't send and this string will not appear"
echo "it appears it has stopped at the write command"

View 5 Replies View Related

Programming :: Perl About System Command / Fails If The Standard Shell Is Dash And Not Bash?

Jun 30, 2011

I am trying to fix a perl script, and I really suck at perl. But I think this problem will be easy for people who know it.

The problem is, I have an old setup script someone wrote many years ago. It fails if the standard shell is dash and not bash. The only way I've gotten it to work is to point /bin/sh to bash. I looked thru the script and it uses "system" many places, and I think that's the problem.

I searched for it and found this link:url

My plan is to include this function:

Code:
sub system_bash {
my @args = ( "bash", "-c", shift );
system(@args);
}
Then I could simply change all calls to system into system_bash and it should work?

The parameter to the system calls is usually some variable. What if the parameter is a list already? Do I need to test for it somehow, and if it's a list, prepend "bash" and "-c" to the list? How do I do that?

In the script there are lots of places like this:

my $error = system($cmd);
if ($error) {
die/warn "some error message";
}

Shouldn't there be a return in the system_bash function?

View 8 Replies View Related

General :: Get Start With Graphics Programming In C Under System?

Jun 24, 2010

Can anyone tell me how do i get start with graphics programming in c
under linux..

View 3 Replies View Related

Programming :: GNU Make - System Libraries And File Permissions

Jan 27, 2010

I am trying to compile a C++ source file into a static library using make with root privileges (i.e., using "sudo"). However, I "sometimes" get the following compilation error:

Code:
g++ -Wall -g -fPIC -W -c /home/project/ether/src/packet-ethernet.cc
ar -cvq libether.a /home/project/ether/src/packet-ethernet.o
ar: /home/project/ether/src/packet-ethernet.o: No such file or directory
make: *** [libether.a] Error 1

I checked /home/project/ether/src folder to see if packet-ethernet.o in fact does not exist, and saw that it is actually located there, but its owner is "root", which is different from the current user. If I change the owner of packet_ethernet.o from root to the current user using "chown" command and execute make again with sudo, everything seems to be fine.

It may be a coincidence that I recently migrated to 64-bit platform from 32-bit, and then installed libboost-filesystem1.40-dev. After that, I began to experience such errors. I have "never" come across such a compilation error before. Even though I completely removed libboost-filesystem1.40-dev afterwards to see if it causes the problem, nothing changed.

After migrating to 64-bit and installing libboost-filesystem1.40-dev, my application exhibited another "weird" behaviour such that it produced "hidden" files using mkdir() system call, which were previously created as regular ones on the filesystem. Can compiler options that I use cause such problems? Is it possible that libboost-filesystem1.40-dev overwrote some system libraries so that I am getting such errors ?

View 1 Replies View Related

Programming :: Start Up A Shell Script When The System Starts?

Mar 1, 2010

This is on Fedora 11. How do I start up a shell script when the system starts?

View 6 Replies View Related

Programming :: Start Video Resource Manager In System?

May 5, 2010

I am trying to develop a video resource manager in Linux.By that what I mean is, if two applications (may be running in two different machines) are trying to play videos, the video resources will be served by this video resource manager (running at a center location). Pardon me as I donot have much idea about video resource handling in Linux , first of all , it is feasible to have this kind of a layer, in between the applications and the available resource hardware.
Kindly give me some pointer as to how do I start? Pl. give me some reference URLs.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved