General :: Disabled Vet Looking For A Tutor To With Script Writing?
Feb 12, 2010
My name is Barry and I have lost my job as a plumber because of the ecomony. I have been going to school for two years now at Ivy Tech in Indiana. Myself, along with other vets in my Linux System Administrator Class are in need of a tutor for this class. I go to school in Valporaiso, Indiana. The V.A. is willing to pay $60.00 per hour per person. We are all are willing to be tutored as individuals or as a group.
Tutoring 5 or so people at a time is $300.00 an hour, if you know what I mean! There are no tutors in this area we know about. This problem has been a on going problem with the school. You would have to sign up with V.A. so that you could get payed. You would get paid once a month. There are serveral vets in this area that need help and it would generate alot of money for someone out of work. You must be qualified by having experience, you don't have to be a teacher with a teaching degree.
My VPN is behaving funny sometimes, and I have to restart it often.I wanted to write a script which does that for me.It doesn't have to be anything fancy, just a shortcut for the commands I have to type into the terminal. More specifically: it will look at the running processes.If it finds a running vpnc process, it will kill it. Then it will start vpnc.I've written bash scripts of similar complexity,but now I don't have a bash,only an ash. Until now, the only difference I noticed is that there are much less commands available, but then, I don't use it very often.So I have some questions.
Is writing ash scripts different than writing bash scripts?
Is there something specific to consider when doing it?
When the script is ready, how can I deploy it? For bash, I just put the executable file under /usr/lib and run it by typing the file name into the command line, will this work with ash?
Are there any special pitfalls to watch out for in the script I want to write? I think that the killing process part may get hairy, if I write something that kills the wrong process, but even then running the script shouldn't break anything permanently, right?
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)?
Basically I have a USB flash drive currently formatted under vfat. I can log in as root and the system automatically picks it up and automounts the drive successfully. What needs to happen is that a non-root user needs to be able write to this device while root has mounted this device. Due to other program constraints, I can not mount the device using another user so I have to do it with root.
My video card writes the CRT in one of two "modes". High intensity ("bright chars") and low intensity ("dim chars"). How do I set vim in order for him to use only low intensity?
I need to write an else-if condition in a makefile, and though the format is posted on several websites, nothing seem to be working, andI get an error everytime. Could anybody please write a small example with an else-if conditional in a maekefile?
so this makes acsv file with one column. I want to run it again but rather than outputing to a new csv i want to add it to this one as the next column. For this example there will be 100 rows per column.
the 1st one will make the file
[grassGIS code]> /home/gary/AVE_monte_carlo/rstats_AVE.csv add ',' after each value the next one [grassGIS code] open file /home/gary/AVE_monte_carlo/rstats_AVE.csv
I am trying to write input to a shell and get the shell to parse the input that I am writing to it as if a user was typing in commands.
Thus far I have tried echoing some text into the shell's FD for STDIN in /proc/<pid>/fd Whilst this displays the text that I echo, the shell that I am writing to never tries to execute the command that I pass to STDIN. What is the difference between a shell taking STDIN from the user and data written to STDIN by another process e.g. echo ? It appears I am missing something fundamental.
I'm writing a script that among other things partitions and formats disks using SW RAID and LVM. I've read somewhere that for older versions of Linux it was a good idea to use the dd command to zero the first couple of blocks od a device before partitioning it (or formatting it?) Is this practice still recommended? To what end?
I've seen the trackpad tool to write chinese characters on macs, is there any such linux clone? Or are there any projects that anyone knows of which are trying to create that for linux?
Is it possible to write ksh script in the spec file? The target is after I perform rpm -i my_rpm.rpm According to the spec file, ksh script will do some installation & configuration. For example run other script and edit some files.
I have custom software that writes to a sensitive large file when the user does something. I would like to make backup copies of The file that gets written to, but if I make a gzip of the file at the same time someone is changing something, it will corrupt the backup because some of the data will be missing, as its backed up during being written to.
a) Is there a way to detect if a file is currently being accessed/written to? That way if its currently being accessed, I can just make the script wait until its done and then finally back it up.
b) Instead of backing up the large file while it has potential to get written to, would it be better to make a copy of the file first, then gzip the copy? This idea comes from the fact that gzipping the original takes 5-10 seconds, whereas making a copy only takes 1-2 seconds. The less time, the less chance of corruption.
c) Is there anyway to freeze a program or a file to stop it from being written to for an amount of time?
With a, b, and c together. The best solution I have to my problem would be a script that first detects rather the file is being accessed. If not, it would then freeze the file/program and then make a quick copy of it. Once the copy is created, it will unfreeze the original file/program and then go about gzipping the copy.
I've used ext2ifs drivers to mount my ext3 partition in winxp, but I don't have write acces, it's mounted in a read-only mode, and i didn't check the rad-only box during the installation of the drivers.I've used help from the official site http://www.fs-driver.org/and this tutorial http://www.dedoimedo.com/computers/l...s-windows.html It's a straithfoward proces so I dont understand what I did wrong.I'm using fresh xp install with (more or less) all the updates and ubuntu 10.04Also the partition is mounted at /home, so I dont know if that makes any diferance.
I left the linux world for a few years and now i am trying to re-learn my shell scripting basics. I am writing a script for an alarm clock, but i seem to be running into a few issues.
declare -i H declare -i M declare -i currentH declare -i currentM declare -i minutesLeft
[code]....
My script, instead of doing what it should, produces the following errors:
./alarm: line 19: echo 11: No such file or directory ./alarm: line 26: 6: command not found
[code]....
and if i choose the time 11:06, files called 11 and 6 are creating in the working directory. I am sure it is something really simple, but i haven't used linux or scripting on my computers in around 6 years.
I am using a new install of Kubuntu 10.04 LTS. My system is a 64-bit AMD desktop.
I use a small partition for my entire Kubuntu install, and use separate, larger partitions for my media and work files.
I opened up Dolphin (my KDE file manager) via GUI, navigated to my media partition, and attempted to create a new folder by right-click-> Create New-> New Folder-> etc
The Create New in the menu is ghosted out, as if I have no permission to access it.
I have two servers, 82 and 70.My exports file on 82 reads /...70(rw)on 70 I have a mountpoint called mnt_for_82I execute on 70mount -t nfs -o rw ...82:/ mnt_for_82I go to server 70 and indeed can read and travers the mounted subdirectories. However, I try to create a file or subdirectory under the mount point on 70 and I get a *Permission Denied* error.I'm sure there is a simple explanation for this issue as well as a correct nomenclature for what I'm trying to do in nfs
but I won't get any better at this unless I dive in, so here is the question in full that I am having trouble with and I'm sure you can all get a good laugh at:Write a shell script called nbin. First the script changes to the home directory. Then if there is a bin directory under the current directory, display the message bin has XX files". (Note: the XX will be substituted with the actual number of files in your bin directory)
So far I have done: vi nbin #!/bin/bash PATH=/bin:$HOME/bin
how to match to find matches in two different files when comparing timestamps. The fields I'm wanting to match up are in the format:
Jul 26 09:33:02
I have tried reading the file line by line and using awk '{print $1,$2,$3}' which only gets and stores the timestamp in one of the files. I've been looking around and saw this example:
awk 'FNR==NR{!a[$3]++;next }{ b[$3]++ } END{ for(i in a){ for(k in b){ if (a[i]==1 && i ~ k ) { print i } } } }' $FILE $FILE2
Which sorta works but its way over my head at the moment. The two files can be found in your /var/log/syslog and /var/log/auth.log (using Ubuntu 11.04)
I usually download files from internet throughout the night. I can shut down computer automatically using commandshutdown -P timeThis works well ,but very often ,electric supplies cutoffs and system get rebooted and remain booted uselessly.In such case i want to use c program to shut down system after particular time which i will add on startup application list.If i added it on startup application every time i boot the computer it will automatically shutdown after particular time so ,to use the system i should be able to disable that program.
is it possible to write ksh script in the spec file? the target is after I perform rpm -i my_rpm.rpm according to the spec file , ksh script will do some installation & configuration for example run other script and edit some files
For some time now, I'm having some problems with configuring an NFSv4 server to let it work with a firewall. I've already searched to web, but I was unable to find a solution that works for me.
The situation is as follows: I'm trying to connect an NFS client to an NFS server that is behind a firewall. I don't have access to this firewall, but I can contact the administrator to open some ports for me. I already did this for opening port 2049.
The result is that the client can read files from the server, but is unable to write files to the server. I believe that for writing an extra RPC-connection needs to be set up. However, the ports on which the RPC-connection is set up, seem to be different for every connection (I verified this using 'netstat -tn').
Clearly, this is a problem since the server is protected by the firewall.
Thus, what I want to do is configure the server in such a way, that it always uses the same server-side port(s) to connect with the writing clients (just like 2049 for reading). I've already tried to configure the /etc/default/nfs-kernel-server and /etc/default/nfs-common files, but that hasn't really worked out yet.
Note: Because I don't like to contact the system admin every day, I hooked up 2 computers (client/server) on which I set up the same configuration (without the firewall). I'd like to see it working on those machines first (that is, 'netstat -tn' showing the correct port), before I contact the admin to open some extra ports.