Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
write a script that writes the PID of 2 different processes to a file every other time. as in pid a , pid b, pid a, pid b etc. then write a script that calculates the average runtime of 100 run throughs. (supposed to write a similar program in c that writes the PIDs aswell, to compare runtimes of the 2) 2. Relevant commands, code, scripts, algorithms:
bash
/usr/bin/time - built in gnu time thingy
octave - calculator for the time script
3. The attempts at a solution (include all code and scripts):
this was supposed to get me the 2 PIDs, but not even that seems to work. will redirect them once I get them to return correctly
getting this error when I try to run it as executable
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Norwegian University of Science and Technology NTNU, Trondheim, Norway, Svein Erik Bratsberg, TDT4186 Operativsystemer, TDT4186 Operativsystemer
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
Hi Everyone,
I want your help to write a script which will take text file as input and on the basis of delimiter ":"script will create excel sheet.
Example input:
IpAdress:InstanceName:Port:ServerName
10.255.255.1:abc:2232:xyz_abc
Output should be an excel sheet like below:
Column... (8 Replies)
I have file which contains a huge amount of data. I need to search the pattern Message id. When that pattern is matched I need to get abcdeff0-1g6g-91g3-1z2z-2mm605m90000 to another file.
Kindly provide your input.
File is like below
Jan 11 04:05:10 linux100 |NOTICE... (2 Replies)
Hello,
How can I run this script every 1 hour and save its result to result.txt
ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
Regards
Shaan (5 Replies)
Hello Experts,
I have been trying to work on to call a file in scripts.
@ECHO OFF
call %MY_HOME%\bin\setvars.bat
call %MY_HOME%\db\bin\start_db.bat.
This is a batch file and i want to write same functionality in shell script. How should I achieve it? How should I set variables in a... (1 Reply)
Hi-
I am hoping someone can give me some pointers to get me started. I have a file which contains some dn's .e.g file 1
cn=bob,cn=user,dc=com
cn=kev,cn=user,dc=com
cn=john,cn=user,dc=com
I have a second file e.g. file.template which looks something like :-
dn: <dn>
objectclass:... (5 Replies)
i have no idea abount shell script but i need need shell script to get last 10 char from a file name and write in to a new file.
consider u hav 5 files in a particular dir i script should get last 10 char of each file n write the 10 char in separate files (2 Replies)
So I have a lot of Java applications on my servers all having their own folder from the applications subdirectory. Now, I need to do the following.
Search all the applications subdirectories for message.jar.
If the message.jar file exists, I need to search the application directory for... (1 Reply)
Hi,
In the following part of a script, I am grepping the list of all
running PIDs in the File as in line 3 :-
$pid_count=`grep -c "^${pid_process}$" $CRI_PUSH_BIN_HOME/bin/
PushProcessId`
If I cannot grep this way, then how can I do so.
1 pid_process=`ps -ef -o pid,args |... (1 Reply)
I am trying to write a Shell script wherein the shell needs to read a list of PID in the File $stat/bin/Process and compare it to the PID of the processes running on a server.
Also the script should return KO(not OK) with corresponding label :-
a) When an environmental variable not... (2 Replies)
:confused: Hi
i am trying to make a script through which i can get the total number of User and their PID after that kill all Users except the one by which i am currently logged in. (i m using SCO UNIX 5.06)
# id of current usre < total number of current user
USR=`who -u |wc -l`
# id of... (2 Replies)