1,891 Topics

Member Avatar for
Member Avatar for sri1230

Hello guys - Need help with a windows batch script that would kill processes by the memory usage but leave the last one. For example if i have 10 java.exe processes running i want to kill the top 9 by memory usage and leave the last one alone. Help appreciated! …

Member Avatar for Hawkeye Python
0
104
Member Avatar for shawnk

I am trying to execute a simple grep command in my shell script. I am not sure why it also greps the other file system. [COLOR="Green"]> df -g|grep /oracle/BP1/sapdata1 70.00 11.37 84% 21 1% /oracle/BP1/sapdata1 100.00 89.44 11% 8 1% /oracle/BP1/sapdata10 > df -g|grep /oracle/BP1/sapdata10 100.00 89.44 11% 8 1% …

Member Avatar for shawnk
0
93
Member Avatar for johndoe444

hi, how can i measure the accurate run time of a program by writing a shell script? Like I want to use some for loop and run some samples and then i want to subtract the end_time-start_time to get the duration and thereby average.

Member Avatar for thekashyap
0
308
Member Avatar for lomaree

Hi All, I am a newbie and I am trying to write a script to be run in solaris so that it will send email to admin about the file system statistics e.g. file system current size, amount of space left and all root emails about system health. Any help …

Member Avatar for thekashyap
0
30
Member Avatar for Democles

I have a text file that reading the directories i need to create the only problem is I need to include a if statement to check if the directory is already made. How do I go about doing this I have these two files currently.. [CODE]#1/bin/bash cat directory.txt | while …

Member Avatar for thekashyap
0
101
Member Avatar for miraj0072004

hello friends, This may sound very primitive, but that's no wonder cos I am very new to this. I would like to know how to find out the current operating system that I am using, with shell commands. For example, if I am using ubuntu and fedora , and a …

Member Avatar for thekashyap
0
52
Member Avatar for miraj0072004

hi friends, I need some help in keeping count of particular IP addresses that I read from a text file with ip addresses.i.e let's say 123.456.789.123 - 15 times, 542.432.456.123 - 6 times etc etc ...thanks in advance

Member Avatar for miraj0072004
0
81
Member Avatar for Stubaan

Hi folks I have tried posting this in the python forum without any luck ([url]http://www.daniweb.com/forums/post1120606.html#post1120606[/url]), as well as on the official Intel Fortran forum (because I have also attempted it in Fortran). I am not one inch closer to solving this. All I want is to be able to overwrite, …

Member Avatar for cfajohnson
0
114
Member Avatar for chris5126

Hi guys, I have a shell script which is to run on multiple OS, I have the following two variables declared: [code] NPAID_CMD="ps -A -o pid,comm | grep NParchiveSM | awk -F \" " '{print $1}'\" SHMMAX="echo "Not impletemted on $OS"" [/code] On Linux the above decelerations are fine and …

Member Avatar for cfajohnson
0
75
Member Avatar for inspire87

I have the following line of code: [CODE]sed -i "/MatchText/ s/${tgrepLine}/${tNewLine}/" filename.output[/CODE] filename.output contains this: [CODE]blablabla PATH=".:/home/root/bin/:/usr/local/bin/" blablabla[/CODE] Variable ${tgrepLine} contains: PATH=".:/home/root/bin/:/usr/local/bin/" Variable ${tNewLine} contains: PATH="/home/user/bin/:.:/home/root/bin/:/usr/local/bin/" As you can see, both variables contains " (double quotes) If I run the 'sed -i' command, I get an error. I cant use …

Member Avatar for cfajohnson
0
124
Member Avatar for rhoit

hi every one.... i was trying to rename the no of files [QUOTE] Like "Prison.Break.S01E01.HDTV.XviD-LOL.srt" to "Prison Break.101.srt" and so on to the following files Desktop/1/Prison.Break.S01E01.HDTV.XviD-LOL.srt Desktop/1/Prison.Break.S01E02.HDTV.XviD-LOL.srt Desktop/1/Prison.Break.S01E03.HDTV.XviD-LOL.srt Desktop/1/Prison.Break.S01E04.HDTV.XviD-LOL.srt Desktop/1/Prison.Break.S01E05.HDTV.XviD-LOL.srt Desktop/1/Prison.Break.S01E06.HDTV.XviD-LOL.srt Desktop/1/Prison.Break.S01E07.HDTV.XviD-LOL.srt Desktop/1/Prison.Break.S01E08.HDTV.XviD-LOL.srt Desktop/1/Prison.Break.S01E09.HDTV.XviD-LOL.srt[/QUOTE] i tried to use [CODE]$mv "Prison.Break.S01E0[1-9].HDTV.XviD-LOL.srt" "Prison Break.10[1-9]" mv: target `Prison Break.10[1-9]' is not a directory …

Member Avatar for nezachem
0
196
Member Avatar for shanie7

Hi i am new to shell scripting, i need some help please. I have a folder that i am sharing between my linux server and my windows computer. I want to do a shell script that let me know when the size of that folder has passed 110 gb, and …

Member Avatar for thekashyap
0
171
Member Avatar for sarosh

hi everyone... we have to run any python file e.g. show.py at startup..i.e. when OS starts it runs automatically. we are proceeding this way, writing a startup script named forfyp2 ,pasting it in init.d , making it exe using chmod , creating startup links using update-rc.d forfyp2 defaults. After this …

0
73
Member Avatar for rhoit

Little bit help here i wanna cp the no of files listed in text file... i tried to use [CODE]for songs in $(cat "~Desktop/1/list.txt"); do cp $songs NewSongs/; done[/CODE] but my text file has the path with spaces like /home/rhohit/Music/00 Database/Albatroos/Albatroos/Albatroos - 01.आवाज.mp3 /home/rhohit/Music/00 Database/Albatroos/Albatroos/Albatroos - 02.खसेका तारा.mp3 /home/rhohit/Music/00 Database/Albatroos/Albatroos/Albatroos …

Member Avatar for Aia
0
97
Member Avatar for Stubaan

Hi folks I am struggling to pass the value of a variable, to be used as an argument for a number of sequentially called python scripts, themselves called from a bash script. Apologies for the pathname chaos. Phase 1: reads the case names from a text file, line by line, …

Member Avatar for Stubaan
0
4K
Member Avatar for bharatk

Hello I have a .py file. I am creating a .bat file which when clicked runs the python script & saves the output as a text file in the same directory. I gave this inside the batch file [CODE]%CD%\App1.py > %CD%\op.txt [/CODE] but I am not able to see the …

Member Avatar for bharatk
0
242
Member Avatar for Obi-Won-Knewbie

[LIST] I am new at scripting and need help developing a script that will look at a diff file size I've created from the original file and compare the size to the orignal and send a return code of 1 to the /etc/notify if the file is less than 6-% …

Member Avatar for thekashyap
0
132
Member Avatar for garyinspringhil

I have a series of variables like so: $BLACKPASS=7 $BLACKCUTDEPTH=567 $SURFACE=325 NUMBEROFPASSES=$((($BLACKCUTDEPTH-$SURFACE )/$BLACKPASS)) #is 34 Text To Edit: IN; PU; SP6; !PZ-325,200; snip here (inclusive)SP6 is a known/usable starting point VS25; PU9170,-10213; PD9170,-10827; PD7967,-10827; PD7967,-10213; PD9170,-10213; PD9170,-10213; PU9170,-10213; snip stops here inclusive BEFORE the next SPx line SP7; !PZ-325,200; VS8; …

0
76
Member Avatar for wish4129

Hi guys, i would like to ask that is there any way to check whether an process is ended by using batch scripting? i want to start another program B only when the program A is ended.. Any reply would be appreciated, thank you and have a nice day.

Member Avatar for Salem
0
91
Member Avatar for freshfitz

Is there any way to launch this .vbs and popup which file to run? Dim WSHShell Set WSHShell = WScript.CreateObject("WScript.Shell") ' open maximized and wait WSHShell.Run "c:\progra~1\la\file1.exe" or run c:\progra~1\la\file2.exe Set WSHShell = Nothing WScript.Quit(0)

0
67
Member Avatar for jananis

Hi all can anyone please help me write a shell script for file transfer from windows to unix server and vice versa. i m new to unix shell scripting so kindly bare with the small mistakes tht i mite have made the code is: [CODE]#!/bin/sh filename="sample.txt" user='user' password='passwd' IP='some ip' …

Member Avatar for jananis
0
343
Member Avatar for johndoe444

For the code snippet I got some error which I can't explicate: [CODE]xyz@lin309-05:~/workspace/os-prj2$ ps -ef | grep node.o xyz 21679 1 0 20:00 pts/1 00:00:00 ssh lin309-05.cise.ufl.edu cd workspace/os-prj2 ; touch /tmp/fu0 ; ./node.o host0 4001 3 2 6 3 lin309-02.cise.ufl.edu:4002 lin309-03.cise.ufl.edu:4003 storm.cise.ufl.edu:4006 host1 host2 host5 host0 xyz 21700 21699 …

Member Avatar for nezachem
0
96
Member Avatar for Shaikh Mohsin

Hello every one i have small shell script code i want to load it as system boots up,how to do it and where to put that code in new kernel that can take effect as soon as i start my pc..... i have tryed some steps 1] create .sh file …

0
73
Member Avatar for yupi

Hi, i am new at shell scripting and i need your help. i have a very big txt file that contains articles,authors,etc. Each article has this form: .I <article's serial number> <article information(in new line)>. What I need is a script tha will split this file into smaller ones.The script …

Member Avatar for Kruptein
0
134
Member Avatar for Adila

I'm editing the startxwin.bat which came with cygwin What I'm trying to do is, to be able to run a ns simulation automatically when I open the batch file without having to type this command: [CODE]ns example.tcl[/CODE] I'm not sure if I'm on the right track, I've been playing around …

0
61
Member Avatar for flipjoebanana

Basically searching all files in a directory and locating those that contain a certain word within them. For example, I want to know what files contain the word 'apple', if there is just print the filenames that contain 'apple' somewhere in the text. The only thing I really need to …

Member Avatar for thekashyap
0
126
Member Avatar for mona-lolly
Member Avatar for thekashyap
0
126
Member Avatar for arvindikchari

Hello I have 2 very similar sites, aariclinkdirectory.tk and Abbottlinkdirectory.tk . The 2 sites use the same script, both are link directories, only their names are different. What I did was I installed Aariclinkdirectory.tk successfully, and then copied the db data for this site, and suitably modified the db data …

0
85
Member Avatar for tones1986

Hey guys - i am working off three files that contain information on associates and their sales. The files are: products: (product ID, name, price item) % cat products 103:sway bar:49.99 101ropeller:104.99 104:fishing line:0.99 ... 108:wheel:49.99 111:lock:31.00 102:trailer hitch:97.95 sales: (product ID,num. sold, date sale, associate ID) % cat sales …

Member Avatar for bobydavid71
0
208
Member Avatar for komyg

Hi I've developed a C# program that takes a directory list as its arguments. What I want to do is execute a batch script that would run a command like dir /b and send its ouput to my C# program. I believe that if I were using Linux, my script …

Member Avatar for Salem
0
141

The End.