fedora-users October 2011 archive
Main Archive Page > Month Archives  > fedora-users archives
fedora-users: OT: need bash help

OT: need bash help

From: Mike Wright <mike.wright_at_nospam>
Date: Mon Oct 17 2011 - 19:39:42 GMT
To: Fedora Users <users@lists.fedoraproject.org>

Hi all,

I'm trying to write a bash script and having problems.

If I execute this:

   ps x | grep mongod | wc -l

it returns a value.

OTOH, if I execute this:

   LINES = ps x | grep mongod | wc -l

it returns "command not found".

How does one assign the output of a command to an environment variable?

Mike Wright
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines