-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc97515
commit 29b0ea9
Showing
2 changed files
with
6 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -z $1 ]; then # check user has passed in search terms | ||
if [ -z $1 ]; then # check user has passed in search terms | ||
echo "pass in search terms" | ||
return 0 | ||
else | ||
data="ps -ef | grep $USER" # search processed for current user | ||
data="ps -ef | grep $USER" # search processed for current user | ||
for term in $@; do | ||
data="$data | grep $term" # grep for each term separately | ||
data="$data | grep $term" # grep for each term separately | ||
done | ||
|
||
eval $data # evaluate grep statement | ||
eval $data # evaluate grep statement | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters