1,891 Topics
| |
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! … | |
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% … | |
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. | |
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 … | |
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 … | |
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 … | |
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 | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
[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-% … | |
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; … | |
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. | |
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) | |
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' … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
i wanna create my own commands in linux shell ?what should i do for this ? | |
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 … | |
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 … | |
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 … |
The End.