1,891 Topics

Member Avatar for
Member Avatar for man5237
Member Avatar for eggi
0
258
Member Avatar for amit_s

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.

Member Avatar for eggi
0
72
Member Avatar for shwick

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 …

Member Avatar for shwick
0
135
Member Avatar for born4unix

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 ?

Member Avatar for masijade
0
58
Member Avatar for evios

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 …

Member Avatar for masijade
0
116
Member Avatar for Jaoqua

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 …

Member Avatar for eggi
0
84
Member Avatar for lmrd

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 …

Member Avatar for mittelgeek
0
137
Member Avatar for hbmarar

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 …

Member Avatar for eggi
0
147
Member Avatar for KarthigaB

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 …

Member Avatar for Salem
0
93
Member Avatar for camila22

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%) …

0
43
Member Avatar for phynias

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 …

Member Avatar for manik007
0
123
Member Avatar for jesseb07

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 …

Member Avatar for jesseb07
0
124
Member Avatar for bmead

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 …

Member Avatar for bmead
0
105
Member Avatar for rast1979

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 …

Member Avatar for rast1979
0
130
Member Avatar for Gresakl

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 …

Member Avatar for JeoSaurus
0
116
Member Avatar for neclark2

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 …

Member Avatar for JeoSaurus
0
153
Member Avatar for Clockowl

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,

0
110
Member Avatar for Duvva

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.

Member Avatar for masijade
0
57
Member Avatar for yair7190

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" …

Member Avatar for ghostdog74
0
119
Member Avatar for jasminselvaraj

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, …

Member Avatar for radoulov
0
142
Member Avatar for choco4202002

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 …

Member Avatar for JeoSaurus
0
77
Member Avatar for Bavananth

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 …

Member Avatar for Bavananth
0
114
Member Avatar for mashimaro

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 …

Member Avatar for Salem
0
109
Member Avatar for Luckychap

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 …

Member Avatar for Luckychap
0
150
Member Avatar for a.kris

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 …

Member Avatar for eggi
0
200
Member Avatar for dotmac

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 …

Member Avatar for eggi
0
277
Member Avatar for megladon

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 …

Member Avatar for eggi
0
91
Member Avatar for Eilya

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

Member Avatar for eggi
0
175
Member Avatar for i.linus

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, ------------------------------------------------------------------------------------- …

Member Avatar for Salem
0
170
Member Avatar for ryanique

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 …

Member Avatar for eggi
0
65

The End.