Question

Need some help with this UNIX problem: Write a single line UNIX command to mail only...

Need some help with this UNIX problem:

Write a single line UNIX command to mail only the process ID of running Java program test to the email [email protected]

0 0
Add a comment Improve this question Transcribed image text
Answer #1

ps aux | grep -i test | mail -s "Java process id" [email protected]

# ps will give all the process list

# ps aux | grep -i "name of your desired program" will give process id of running application

# mail command will email the process id to [email protected] with given subject

Add a comment
Know the answer?
Add Answer to:
Need some help with this UNIX problem: Write a single line UNIX command to mail only...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1) Write a single line UNIX command to list all sh files matching the multiple conditions...

    1) Write a single line UNIX command to list all sh files matching the multiple conditions below: • at directory "/home/test" • filename containing "exam" 2) Write a single line UNIX command to check if "/home/exam2" in the PATH variable. 3) How to obtain the value of command line arguments in a shell program? 4) Write a single line UNIX command to run an executable Java program Hello at background and output the number of lines in the result. 5)...

  • I need some help with the cp command in Unix/Linux. I need to copy all the...

    I need some help with the cp command in Unix/Linux. I need to copy all the files in my current directory A03 into the backup directory. How do I do this? I am taking an introductory unix/linux course so I need a basic answer. Thanks.

  • I need help with a java program Write a program Enigma that takes a single String...

    I need help with a java program Write a program Enigma that takes a single String as a command line argument. Enigma should read the file specified by the String argument, add 5 to each byte, and leave the altered data values in a file whose name is the command line argument. Note that this "updating in place" is the most difficult part of this lab: java Enigma sophie.dat should read file sophie.dat, and upon completion, leave the modified data...

  • Help please Write a program named one.c that takes a single command-line argument, the name of...

    Help please Write a program named one.c that takes a single command-line argument, the name of a file. Your program should read all the strings (tokens) from this file and write all the strings that are potentially legal words (the string contains only upper-case and lower-case characters in any combination) to the file words. Your program should ignore everything else (do not write those strings anywhere 1. As an example, running /a.out dsia would result in the generation of the...

  • Write a full program that will accept any number of command line arguments and print them...

    Write a full program that will accept any number of command line arguments and print them to the screen. Suppose your program is called Print.java. When the command java Print hello goodbye you is run, the output will be hello goodbye you Write a full program that will accept exactly  three command line arguments that can be interpreted as integers, and will add them up. If there aren't exactly 3 command line arguments, print an error message and terminate the program....

  • JAVA DATA STRUCTURES Write a line-based text editor. The command syntax is similar to the Unix...

    JAVA DATA STRUCTURES Write a line-based text editor. The command syntax is similar to the Unix line editor ed. The internal copy of the file is maintained as a linked list of lines. To be able to go up and down in the file, you have to maintain a doubly linked list. Most commands are represented by a one-character string. Some are two characters and require an argument (or two). Support the commands shown below: Command Function Go to the...

  • Need some help on the following JAVA problem: Write a program in which the main thread...

    Need some help on the following JAVA problem: Write a program in which the main thread creates two threads named “Display” and “Daemon”. The first thread (Display) executes in an infinite loop and prints out its name and system time every 1 second until it is interrupted by the main thread. The second thread is a daemon thread that executes in an infinite loop and prints out its name. The main thread waits for a specific number of seconds n...

  • Write a C program called test that takes one command line argument, an integer N. When...

    Write a C program called test that takes one command line argument, an integer N. When we run test: ./test N the program will do this: the parent process forks N child processes each child process prints its process ID, exits the parent process waits for all child processes to exit, then exits

  • Please, please help! (Programming Assignment: fork gymnastics) Write a C/C++ program (call it string-invert) that takes...

    Please, please help! (Programming Assignment: fork gymnastics) Write a C/C++ program (call it string-invert) that takes a string argument from the command line and outputs the string in reversed order You have two constraints: Constraint 1: Each process can output at most one character. If you want to output more than a single character, you must fork off one or more processes in order to do that, and each of the forked processes in turn outputs a single character t...

  • Please I need help with this problem Write a c++ program that will accept the names...

    Please I need help with this problem Write a c++ program that will accept the names of 3 processes as command-line arguments. Each of these processes will run for as many seconds as (PID%10)*3+5 and terminate. After those 3 children terminated, the parent process will reschedule each child. When all children have been rescheduled 3 times, the parent will terminate. Each child must print out its process id every time it runs.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT