1,891 Topics
| |
Shell program to check whether a given number is avogadro number or not. | |
Hi, I need to download email attachments using shell scripts. How to achieve this as I am a newbie in Linux/Unix environment? Thanks & Regards, Amit. | |
Running ubuntu 8.04 I built this off of the tripwire daily cron script. I'm trying to check the number of violations. There's a problem when $tripResult is instantiated with the tripwire report- it doesn't have any newline characters. This causes grep to not get the line with the number of … | |
Hi, I want to find out files which were created,modified, accessed on specified date say "1 Oct 2008" and after that on file system level. can u please suggest me how to find that ? | |
Hi to all the experts here, I am a true newbie on bash script and I have a couple of questions need to seek help: 1. What does "safe" delete command script means? I am confused with this statement: Write a "safe" delete command script. Filenames passed as command-line arguments … | |
I am trying to dynamically create some shell script and run it (but don't know how!). I want to read in a string from a file (e.g. '[icode]echo $myvar[/icode]') then run that string (and, yes, myvar IS an existing variable). Can it be done? I have thought about writing it … | |
Hey all. I have an interesting problem. I have a file with a ton of raw hex data in it. I need to convert it into human readable text for display on a web site. The problem that I am having is this. For some of the data I need … | |
Something off the box: I got a log file of the pattern say like this : 19876 Exception happened at heylog.php. 19878 Argument missing I need a shell script / awk which should get the file, read the line and should get me the line number displayed with that message … | |
Hi All, I have some log messages and sysout statments in my java code. I am executing my code through a shell script. I could able to see all my sysout statments since I have redirected stdout message to a file. Now I need to see the log messages to … | |
Hi there, sry all for my bad english i have this script but need to modify something if anyone can do it for me , this script need to start it in my linux box in process to monitor and when user deplete CPU or MySQL or something in (10%) … | |
i have a modsecurity log that i want to pull a couple things from. here is an example line [05/Mar/2008:12:50:07 --0800] [[url]www.mydomain.com/sid#1ef44178][/url][rid#2042fa58][//member/index.php][2] Warning. Match of "rx ^OPTIONS$" against "REQUEST_METHOD" required. [file "/usr/local/apache2/modsec/modsecurity_crs_21_protocol_anomalies.conf"] [line "41"] [id "960015"] [msg "Request Missing an Accept Header"] [severity "CRITICAL"] [tag "PROTOCOL_VIOLATION/MISSING_HEADER"] so i want to … | |
hello, I wrote an expect script to automate ssh commands, and it was working, but for some reason it's not anymore. Just to make sure I didn't do any weird changes that I didn't notice, I tried several of the dozens of such scripts that are online, and for some … | |
Howdy, I'm a total newbie to scripting and I can't figure out the proper syntax to shell script a for loop for the following scenario: I have a directory of symbolic links to backup log files. I want to loop through the dir to cat the last 21 lines of … | |
Hello I am trying to use the find command to search for the last files modifyed under certain directory Example: #find /tmp -mtime -1 find all the files modifyed from 1 hour ago The question is: Somebody knows hou can I do the same but using minutes or seconds instead … | |
I'm working on a bit of homework and I don't need someone to do it for me but to help out with this portion. The rest of it is pretty easy to manage since I already have it mostly done but right now I can't figure out how to get … | |
Hi, As the title suggests, I am completely clueless when it comes to shell scripts. However, I am in a position where I need to write one so I thought would ask for some help. What I need to do is dump every database in my instance of mysql into … | |
Does anyone know if it's possible to create a shellscript that knows when it's fopen()ed? So when any process fopens() it, it can take an action? Thanks in advance, | |
Hi can anyone helpme out in writing a batch file to delete archived log files. The batch file should delete the files in those folders that meet the criteria(files older than 3 months)and if all the files in the folder are deleted then the folder itself should be deleted. | |
hi everyone, im trying to write a shell script that calculates memory usage of several processes (i basically run bash several times). here's the script: [code=bash] #!/usr/bin/bash memUsage=`ps -ef | grep bash| awk '{sum+= $2}'` echo $memUsage if $memUsage>130000000000000 ; then echo "mem usage exceeded" else echo "mem usage normall" … | |
Hello all, I have one shell script that takes the filename for processing as an argument. for eg. ./BulkEdit.sh SampleFile.xls. In the script it reads the filename from "$1" and does the processing of that particular file read from command line. If i have space character in the file name, … | |
how to find all of the IP addresses in any and all of the files under /var/lib/output/*, ignoring whatever else may be in those files? now i can assume anything in those files.....can some one get me started on this. Now i know that the basic logic in this is … | |
Hello experts ! I'm a newbiee to this shell scripting! I try to write a "diff" kinda script which compares two text files and echos the differences. The only different is, my script doesn't care about the character "x" in the first file , being replaced with any other character … | |
Hi, I've got 2 problems with sh: 1) I have a list of logins, seperated by a space (in a logins.txt file, like so: login1 login2 login3). I'd like to display those login names which are online AND on that list. So I made a list of those online: users … | |
Hi all, I am very new to Unix. Please help me to write a script. Here is the discription of what the script should do: The script won't need to be horribly complex; it's to check to see if the hawkagents(a process) on a server have been restarted since the … | |
Hey guys .. I am pretty new to Shell Scripting. I was hoping if some one could help me out with my problem. I am going with a tutorial for shell scripting. While executing some of the programs and commands I am getting errors. I have also checked other sites … | |
Hello fellows, I'm on Mac OS X and have the following problem: Using a common cleanup script I got rid of useless localizations, keeping all the english files: [CODE] find /Applications ~/Applications /Library ~/Library \( -iname '*.lproj' -and \! \( -iname 'en*' \) -and \! \( -path '/Library/Receipts/*' -or -path … | |
Hello All, set -x is useful for me to debug my shell scripts but is there any way to make it write to a file instead of it writing to stderr ?? I do not want to have to do an , [code] exec 2> logfile [/code] to retrieve the … | |
Hi friends, I want (a C++ code) to hide a process in kernel 2.6, I don't want monitoring even in /proc. please help me. Regards, Eilya | |
Guys, I am new to shell script, and want to learn more about it. i have got one script to report on status of ADSL connection. i can understand half of it (or less then half). can you guys please help me out in this. Here is the script, ------------------------------------------------------------------------------------- … | |
Hello Experts, I am new at this and need some help. I am looking for a delete command that allows me after I grep for the hostname to delete all the lines between two characters. for example I want to delete the first line all the way up to the … |
The End.