![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to achicve translate in unix | javeed7 | Shell Programming and Scripting | 1 | 03-31-2008 12:05 PM |
| Translate Toolkit 1.1.1 (Default branch) | iBot | Software Releases - RSS News | 0 | 03-27-2008 09:50 AM |
| Apama CEP Code Snippet | iBot | Complex Event Processing RSS News | 0 | 02-12-2008 01:20 AM |
| Trouble with UNIX tr (translate) function | by_tg | UNIX for Dummies Questions & Answers | 2 | 01-30-2008 07:23 PM |
| translate text (1 position) with sed | peterk | Shell Programming and Scripting | 5 | 12-12-2003 05:31 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Can someone help translate this snippet?
Hello all -
This snippet from a script runs on a Tru64 machine (ksh). if ps -ef | grep thing1 | grep dtsession | grep -v grep then echo "Killing Thing1 desktop session" kill -9 'ps -ef | grep thing1 | grep dtsession | grep -v grep | awk '{FS = " "}{print $2}'' fi I'm trying to translate this and create a similar statement in a bash shell script that is running on Redhat Linux 8.0 Thank you! |
|
||||
|
Quote:
If true (i.e. processes found matching criteria) then pass all of the process IDs to "kill". The command is expecting to find the process ID in field 2, which is parsed by "awk". What error are you encountering? |
|
||||
|
Quote:
I don't write very many scripts so the syntax was throwing for a loop. I understood the jist of it, but wanted to get some clarification. I'm trying to recreate this script so that it will run on a Linux box in a bash shell. thanks! |
|
||||
|
Quote:
|
|
||||
|
Quote:
You say that this snippet is Linux compatible, but I don't think they use dtsession under the Redhat distribution. How do you kill the session under Redhat? Thanks! |
|
||||
|
Quote:
Thomas |
![]() |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|