Use back-ticks `` (like single quotes in the opposite direction) around your command. Example MYVAR=`grep foo bar`
This redirects the standard out of a command into a variable. Rick -----Original Message----- From: Jianping Zhu [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 8:22 AM To: [EMAIL PROTECTED] Subject: how to substutue string in a text file how to substutue string in a text file by using "gerp" or "find"? I have a text file, lof of "abdfggg" in that text file, i need to change it to "opsmsdd", is there a simple way to do that? Thanks -------------------------------- Jianping Zhu Department of Computer Science Univerity of Georgia Athens, GA 30602 Tel 706 5423900 -------------------------------- -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list