I am writing a shell script and I would like to write commands in the script but redirect the output to other konsole sessions. (using kde)
When I run this command:
ps aux|awk {'print $1,$2,$3,$11'}
I get a listing of the user, PID, CPU% and the actual command.
I want to pipe all those listings into a shell script to calculate the CPU% and if greater than, say 5, then to kill the process via the PID.
I tried piping it to a simple shell script, i.e.
ps aux|awk {'print $1,$2,$3,$11'} | ./myscript
where the content of my script is
I have a server running Ubuntu 10, it mostly has PHP websites with MySQL databases.
I need to write a backup script
to backup the database
to zip up all the php files.
Is it better security to do write my backup script in PHP or shell? Or does it not matter?
I like PHP more, because that lets me have the database password in only one place, a PHP file.
A bit of background
I'm a developer and I install most of my tools in my home folder. So my shell's rc file is full of JAVA_HOME, GROOVY_HOME, MAVEN_HOME, ... variables.
Hi,
I am working on a sever A.
I want to write a perl script to execute a shell script persent on the server B.
please help me in this.
thanks in advance.
I am doing server testing and intentionally trying to crash a virtual Solaris server by using all memory. Server has a ulimit of 15 GB (several hundred GB of total system/swap memory). Is there a straight forward way of doing this using a shell/Perl script?
I have an ASP.NET 4.5 (Web API) web application hosted in IIS on Windows Server 2008 R2.
Hi friends you can solve my question about make 3 shell scripts?
Quote:
Write a shell script such that, given multiple files as arguments, showing, for each of them, his name and the number of lines it contains. Try it with any file.
2.
Hi Unix Gurus,
I have a requirement to write a script, Oracle DB gets referesh every 6hrs, hence we need write a script to connceting to the database , if it connects it should generate a file to proceed the next job application or when an error when connectiong to DB it should not generate any file so my next jobs will not be triggered.
Thanks in Advance !!!
Shiv