Slackware :: Writing Basic Bash Script To Toggle Two I8kctl Commands (fan Speed Hi/low)?
Jun 11, 2011
I'm on a Dell Inspiron 6000. I installed i8kutils and it works. Fan speed reduces CPU temp from 50C to 44C. A start-up script invokes the i8k module: $ udo /usr/sbin/modprobe i8k force=1 which creates /proc/i8k. The man page for i8kctl is straightforward: a few simple commands to read info from the aforementioned file.So. I know nothing about writing even basic bash scripts. I gave it a go here but I know this is way wrong. Would anyone like to help a guy out? This is my starting point (don't laugh):
Code:
#!/bin/bash
# script to toggle fan speed low/high
I upgraded from Slackware 64 13.1 to Slackware 64 13.37 a week or so ago. I am now having a perceptible delay of a few seconds when launching commands from the command line, say for example: screen -R.
I want to create a script which toggles a daemon (here proftpd). On the first execution it should start it and on the next one it should stop it but first check if proftpd is already running or not (and make the decision to start or stop on that).I have created this script:
what r the distribution terms of linuxwhat r the advantage of oprn sourcewhat r the bassic commands of linuxwhat r the directories of linuxwhat is file system in linux
My new VPS is running Debian 5.0 (bash 3.2.29), and some commands seems to be missing. For example the ps command is not here, neither is ls (but dir works). Is there a package missing or what's the deal?
Recently got a VPS and installed Ubuntu Server 9 (32bit) When i go to install basic pages like php my admin with commands like..sudo apt-get install phpmyadmin I get a error like this:
root@PkNGssbkpT:/# sudo apt-get install phpmyadmin Reading package lists... Done Building dependency tree Reading state information... Done You might want to run `apt-get -f install' to correct these: The following packages have unmet dependencies:
I have found the cause of my problem, but I am not sure what the proper fix is.The issue is I accidentally modified a dynamic library file on my system (symlinked it to another file), and now common commands such as "ls" and "grep" are failing with segmentation fault
How to compare two wav files [URL] or to be capable to reco simple voice commands? Openbox, fluxbox... can be ran using perlbox voice reco for basic commands. [URL] everything is frequence based:[URL] However we would like to make the use of the ALSA and processing after recording. OK.
Code:
apt-get install -f sphinx2 here is my script: Code: #!/bin/sh # my alsa-1 is my usb mic arecord -Dplughw:1,0 -f cd -vv voicecommand.wav
[code]....
THe next step is to analysis the wav file just created. The advantage is that sphinx2 works for basic commands + it uses only up to 3% of your CPU resources !
When I try execute a variety of basic commands (including ps, ls, ifconfig, locate), I receive the error 'no such file or directory'.
Here are some suggestions that I've found online, that I have tried without success: I did a 'whereis ps' and found the file in the /bin/, and have checked that '/bin' appears when I do 'echo $PATH' I did a filesystem check which showed my hard drive as being clean I tried doing a 'sudo chmod 777 ps' but was told that I dont have permission. I don't think permissions for these files would have changed though (and I can't check as I can't run the 'ls' command).
I mount a BD-RE in Debian Jessie to write about 20GB of data. But the writing speed is terrible slow. I get a Speed of 250kb/sec.
Are there any options to increase the speed of writing? I don't use packet writing and no wodim, no growisofs, nothing. I just mounted the disk and I use mc (Midnight commander) to copy the data.
I have just formated and did a fresh install to start all over. I installed Ubuntu 9.1 and everything went fine but the network. The computer serve as a NAS and MediaPlayer. When getting a file from the server, I get a speed of 40-60mb/sec, which are good for a Gigabit network. When I try to put a file in, the speed can't pass more than 1mb/sec and often stop.
I am developing a GPS driver which is connected over a high speed UART. The driver of the high speed UART is available and it creates a device node /dev/ttyHS0. Now using the device node, I guess, I will be able to read/write from/to the GPS chip from user space but my aim is to write a GPS driver in the kernel space which would communicate with the high speed UART driver. After some initial study, I think I can either write a line discipline driver or a serio to communicate with the GPS chip firmware through high speed UART driver.
I am using putty to connect to some servers. Is there a program that let you connect to say three servers and when you write your commands to server1, server2 & 3 also gets the command? So I don't have to log in to all three servers to do the exact same thing.
I am writing a script to do a speed measurement from my ISP's test ftp server. To do this interactively I connect to the server, enter credentials, enable hash and download a test file. The process concludes with something like
Quote:
################################################################ 226 Transfer complete. 1048576 bytes received in 2.87 secs (356.6 kB/s)
So I entered the credentials for the server in my .netrc file and created a little bash script as follows
Quote:
#!/bin/bash cd ~/Desktop # poiuytrewq is the limit string of the "here" document
[code]...
The script executes as expected EXCEPT that I do not see the statistics at the end of the transfer. It terminates thusly
I have tried adding another ftp command such as ls to the end of the "here" document (in case the results were clipped by the bye command) but to no avail. The ls result immediately follows the ### - no stats I am at a loss.
i was attempting to "speed up boot time" by using the "dash" shell instead of "bash"there is a post on here which describes this.i installed the scripts and uhhhh....rebootednow it seems that i kinda sorta forgot to install "dash" before reboot and now ihave no system shell.no root user accessonly my regular user works, kinda...it seems that i cannot edit anything eitherit won't do any temp dataso with mc i cannot save any edited files.....prompt looks like thismichael@(none):i am hoping i just need to install dash....but with limited power at the command prompt this may be interesting.
When you are performing time consuming operations in bash like installing new software, is it possible to write text that will appear at the prompt when the operation has finished.
E.g
Imagine running:
apt-get install eclipse-platform
Then it will use quite a while to finish while you see the installation log, meanwhile I want to create new folders (workspaces) which Eclipse later will use.
Is this possible without opening a new terminal (or tab)?
I have assignment to write bash script and I have to submit it after tommorow . I do not have experience to finish it by myself.I am really need help if any one can contact me. on my email I will be thanks him/ her.
I'd like to know some good resources, links, e-books to learn basic Linux system administration scripting. I know how to write very basic BASH shell scripts so I'm still at beginner level. There are so many docs out there that I'd like to narrow down people's opinion's on the best easy to understand resources that are available. Eventually I'd like to learn basic PERL as well.
I was assigned to write a bash script in backtrack which will reveal the active IP Addresses on a /30 network. Normally I would not have a problem with this, but I just dont understand because would you not need the entire prefix (ex: 192.168.1) in order to ping sweep for a certain IP range?basically what I'm asking is...How do I nmap a list of IP's for a "/30 network" as that's all that we're given.
Here the description of the issue I am having.I am writing a bash test script which reads lines from a file, builds ISO messages, sends them to a server, reads the response with response code and reports the result of the test to a file or on the screen.The message that I need to send is 94 characters long.Here's the portion of a code that I initially wrote:
~ Open socket. exec 3<>/dev/tcp/172.26.0.25/9991 #~ Send msg.
I am about to write my first shell script for backing up my server.
These are the steps I have identified so far.
Copy files to be backed up to /srv/backup/ run mysqldump and copy the file to srv/backup/databases run duplicity to backup /srv/backup/* to another folder on my machine
I am writing a bash shell scrip that will be run everyday, and will carry out the three tasks mentioned above.
Note: point 3 (backing up to a local folder) is only a temporary measure - to allow me to understand what I'm doing, since all the tools I am using, are new to me. Once I can backup and restore correctly, I will use duplicity to compress and encrypt the files and upload them offsite.
If my understanding of duplicity is correct (according to the documentation here), the first time I run the script, a FULL backup will be done. Every subsequent backup will then be incremental. I will then force a FULL back on say a weekend.
First things first though - I have a few questions:
I would like to use backup rotation for the 'scheme' described above - I would like some recommendations on what kind/type of rotation to use. Once I have implemented the backup rotation, how can I restore from a particular day back in time (assuming the backup exists of course). ?
i know debian and ubuntu but i dont know slackware.i got this mini linux that can run in a 386 with 8mb ram and with GUI really awesome.but i dont know how to renew ip or setup the network card.i tried ifconfig but i see the loopback only nt ip.i tried ipconfig eth0 up and nothing.
What happens when the script executes is that the ssh connection works and parks me at the remote hosts's shell login. Therefore, the "firefox" command refuses to execute. I need to know how to make the "ssh" connection occur, stay open, and go into the background so that the rest of the script can execute.If I could also do this with the "firefox" line so that the entire term window could be closed would also be helpful.