1,978 Topics

Member Avatar for
Member Avatar for chris5126

Hi guys, I need a command on solaris 10 to show how much cpu is bein used in % terms but more specific than sar i need it down to 0.0% if that makes sense. Basically im tryin to find out how much cpu is being used say 25.5% and …

Member Avatar for chris5126
0
95
Member Avatar for Neo7

Hi everybody!! Here is the problem, I'm trying to develop a script that can help me with the raid creation, but, till now, I have been dealing for more than a week and I still didn't achieve any satisfactory results. :icon_cry: Here is the code to execute: # mdadm --manage …

Member Avatar for Neo7
0
190
Member Avatar for chris5126
Member Avatar for ROTC89

ok now im working on another code. i have to add two arrays together to form one array. all that i am getting for the output is 2. here is the code...i know i am missing a few things but i just do not know what exactly. i # some …

Member Avatar for eggi
0
124
Member Avatar for ROTC89

hi im new to this shell scripting. I was assigned to develop some code that increased from 0 to 9 in sort of a pyramid. This is what the output should look like. 0 01 012 0123 01234 012345 0123456 01234567 012345678 0123456789 here is my code please help because …

Member Avatar for eggi
0
275
Member Avatar for chris5126

Can someone tell me why this routine doesnt print out read/write statistics for the first device but does for the other two. I cant seem to work it out. Oh its a ksh script runnin on a solaris 10 box. [code] find_disks() { NETWORKDRIVE=/tmp HOST=`/usr/bin/hostname` integer k=1 integer i=`iostat -en …

Member Avatar for chris5126
0
118
Member Avatar for JustinJose12002

Hi All, How to read the following command line values for a in my shell script? ./test.sh -a file1 file2 file3 i know we can use getopt() but i am geting only first value(file1).. Any help appreciated -jujose

Member Avatar for chris5126
0
124
Member Avatar for pinkfloyd

Hi all, I am using an if condition to compare the word count of a file to be equal to 21.If the file is equal(having 21 words),it is working correct.The problem is that if the file is having different word count than 21 also it is going inside the if …

Member Avatar for pinkfloyd
0
77
Member Avatar for pinkfloyd

Hi gurus, I have a script like this. echo "$file1 does not exists " | mail -s "No File found for $file1" [email]floyd@gmail.com[/email] It is sending the mail.But subject part is not coming.Only the content is coming($file1 does not exists ).Can anyone help me out? Floyd

Member Avatar for eggi
0
97
Member Avatar for yabai1974

I got a simple script if/else script working to check if a process is running and then email if it is not running anymore. My scenario is that I need to make sure the process is always running. Instead of running the script via cron I think it is better …

Member Avatar for Salem
0
225
Member Avatar for Trekker182

What's the best command and line options to use if I'm working with a text file that has spaces pretty much inside each description, field? They are not all uniform in each column and I need to extract them. I've already got rid of the tabs with the tr command …

Member Avatar for eggi
0
102
Member Avatar for babusek

[COLOR="Green"][/COLOR][B][/B][B]HI Folks[/B] This is Question seems like scrap but look into this .. I have several files in a directory(Ex:c:\dir\) now i have to remove the First 3 Characters from the File names in that directory. Using any unix command .. Test Case 1: C:\dir\ 123file.txt 456newfile.mp3 57575unixfile.dat trarruniing.txt After …

Member Avatar for eggi
0
168
Member Avatar for uravikishore

Hi I have server which is hosted in some other location, every day we have incremental backup and every week we have full backup done in the server itself, I need to copy (automate) all backup to my local server.. So I configured ftp server in my local server, now …

Member Avatar for uravikishore
0
121
Member Avatar for gamegod007

The task is i have a folder which has some text files i need to write a shell script which takes this folder as input and in the out put it should give me the filenames,lastmodified date,and the lastline in each particular file help me asap

Member Avatar for noobguy
0
126
Member Avatar for ajay23

Hi all, I am new to shell script. I'm currently running a java application using shell script. When i'm running the java applicaton i need to print all the System.out.println() statements in a file. I don't know how to implement it.. Can any one help me on this. Thanks in …

Member Avatar for eggi
0
69
Member Avatar for neclark2

Hi, So apparently every copy of windows comes pre-installed with a command-line ftp client that can be started by running 'ftp'. However, on the computer I actually need to use this command on, I seem to be missing the client because when I try to do this I receive an …

Member Avatar for eggi
0
85
Member Avatar for Robert72

I'd like to write a shell script that'd parse data from a pipe and then ask the user questions. ie: [code]echo "Ann Bob Charlie" | checkuser.sh checkuser.sh starting Ann is OK. Bob is not in the system. Add Bob? (y/n): [/code] I know a couple ways to read from a …

Member Avatar for JeoSaurus
0
155
Member Avatar for allorehedadem

Good evening , I found a good source of [url=http://www.prcrossing.com]pr jobs and public relations jobs[/url] called [url=http://www.prcrossing.com]PRCrossing[/url]. What is interesting is that is that [url=http://www.prcrossing.com]PRCrossing[/url] consolidates all of the [url=http://www.prcrossing.com]public relations jobs and pr jobs[/url] from other job boards and employer websites and puts them all its site . I …

0
39
Member Avatar for man5237
Member Avatar for eggi
0
265
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
74
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
137
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
60
Member Avatar for harakomeshi

Hi, everyone. I am a budding DBA trying to learn shell scripting. I look forward to participating in these forums. Harako Meshi

Member Avatar for mackone
0
21
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
120
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
86
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
139
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
149
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
95
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
46
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
129
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
126
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
107
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
133
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
119
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
157
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
111
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
60
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
120
Member Avatar for alc6379

Thanks to Dani for adding Python to the scripting languages category! ...I haven't heard many people mention Python around here... Am I the only Python fan here? I know its usage isn't as widespread as Perl, but it is, IMHO, as powerful and useful as Perl, for general scripting, web …

Member Avatar for ZZucker
0
526
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
147
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
87
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
119
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
113
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
154
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
203
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
294
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
94
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
198
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
174
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
69

The End.