Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 10-13-2010, 08:24 AM   #1
LQ Newbie
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
How do I get bash not to interpret the output of a backquote command?

Hello all,

I'm having trouble with a bash script. I have something like this:
export VAR=`command`

The problem is that "command" can return this: "** NONE **". bash will then replace each of the * by the list of files in the current directory.

I want the output to be uninterpreted (i.e. VAR should contain "** NONE **", not "list of files list of files NONE list of files list of files"). It shouldn't be hard but I am unable to figure it out, and I'm not sure how to phrase the problem, so Google wasn't much help either.

Thanks in advance!
Old 10-13-2010, 09:23 AM   #2
LQ Newbie
Registered: Oct 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Managed to do it with set -o/+o noglob.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to interpret Papi output kashyapa Linux - Software 0 07-30-2010 04:59 PM
bash, mysql & backquote driving me mad CopyrightPhilly Linux - Newbie 7 06-06-2009 06:27 AM
interpret tcpdump output powah Linux - Networking 3 09-22-2008 08:22 PM
Wine debugger output: how do I interpret this? trashbird1240 Linux - Software 2 02-02-2007 02:03 PM
Command output conrolling in bash pazvant Linux - Software 1 10-24-2003 08:01 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:13 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration