Sponsored Content
Top Forums Shell Programming and Scripting passing the output of cmd from "eval" to a variable Post 302334704 by dfezz1 on Thursday 16th of July 2009 08:55:56 AM
Old 07-16-2009
Thanks that worked KINDA...
I am getting the value written to the output file, not assigned to the variable ???

So

Code:
 
cmd="$Cat1 $Gr3p0 $Node $Output1"
eval VAR=\$\($cmd\)

works, but when I echo or print $VAR it's empty. ????

But one step closer thanksSmilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get Find command work with a variable passing "*" value?

Hi guy, I have a problem to pass a variable containing '*' value to FIND command. below is the script. It doesn't work by submit below command: rmf.sh name '*.txt' or rmf.sh name *.txt I've tried either optn="-name '$2'" or optn="-name $2"., and there is no luck. ### (script... (5 Replies)
Discussion started by: unxuser
5 Replies

2. Debian

Debian: doubt in "top" %CPU and "sar" output

Hi All, I am running my application on a dual cpu debian linux 3.0 (2.4.19 kernel). For my application: <sar -U ALL> CPU %user %nice %system %idle ... 10:58:04 0 153.10 0.00 38.76 0.00 10:58:04 1 3.88 0.00 4.26 ... (0 Replies)
Discussion started by: jaduks
0 Replies

3. Shell Programming and Scripting

assign shell var output of cmd "wc"

how do I feed output of "wc" to a shell script variable "countBcp"? (2 Replies)
Discussion started by: devy
2 Replies

4. Shell Programming and Scripting

How to store the output of "time dd if= of=" in a variable

Hi All, I need to store the real seconds of the following command in a variable. How could it be done? time $(dd if=/dev/zero of=/dev/sda1 bs=512 count=2048;sync) Thanks, Amio (12 Replies)
Discussion started by: amio
12 Replies

5. Shell Programming and Scripting

store the output of "find" command in a variable?

I intend to find the path/full location of a file(filename given by user thru "read filenme") using "find" or any other command and then store it's output in a variable for some other processing. But struggling to put all things together (i.e finding the fully qualified location of that file and... (4 Replies)
Discussion started by: punitpa
4 Replies

6. UNIX for Dummies Questions & Answers

Explanation of "total" field in "ls -l" command output

When I do a listing in one particular directory (ls -al) I get: total 43456 drwxrwxrwx 2 root root 4096 drwxrwxrwx 3 root root 4096 -rwxrwxr-x 1 nobody nobody 3701594 -rwxrwxr-x 1 nobody nobody 3108510 -rwxrwxr-x 1 nobody nobody 3070580 -rwxrwxr-x 1 nobody nobody 3099733 -rwxrwxr-x 1... (1 Reply)
Discussion started by: proactiveaditya
1 Replies

7. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

8. Shell Programming and Scripting

Storing output of "time" command to a variable

Hi all, I am new to Linux/shell scripting having moderate knowledge. In my script, I need to get execution time of a command (say 'ls') in mili seconds level. For this i tried using "time" command to retrieve the total execution time in milli seconds. But, the problem is that, how to save... (9 Replies)
Discussion started by: happening_linux
9 Replies

9. Shell Programming and Scripting

Perl open(CMD, "cmd |"); buffering problem..

Hello, There's a third-party application's command that shows the application's status like "tail -f verybusy.log". When use the command, the output comes every 1-sec. but when it goes in a script below the output comes every 8-sec...What is the problem and how can I fix it? open(CMD,... (2 Replies)
Discussion started by: Shawn, Lee
2 Replies

10. Shell Programming and Scripting

Using a single "find" cmd to search for multiple file types and output individual files

Hi All, I am new here but I have a scripting question that I can't seem to figure out with the "find" cmd. What I am trying to do is to only have to run a single find cmd parsing the directories and output the different file types to induvidual files and I have been running into problems.... (3 Replies)
Discussion started by: swaters
3 Replies
GIT-WEB--BROWSE(1)						    Git Manual							GIT-WEB--BROWSE(1)

NAME
git-web--browse - git helper script to launch a web browser SYNOPSIS
git web--browse [OPTIONS] URL/FILE ... DESCRIPTION
This script tries, as much as possible, to display the URLs and FILEs that are passed as arguments, as HTML pages in new tabs on an already opened web browser. The following browsers (or commands) are currently supported: o firefox (this is the default under X Window when not using KDE) o iceweasel o konqueror (this is the default under KDE, see Note about konqueror below) o w3m (this is the default outside graphical environments) o links o lynx o dillo o open (this is the default under Mac OS X GUI) o start (this is the default under MinGW) Custom commands may also be specified. OPTIONS
-b BROWSER, --browser=BROWSER Use the specified BROWSER. It must be in the list of supported browsers. -t BROWSER, --tool=BROWSER Same as above. -c CONF.VAR, --config=CONF.VAR CONF.VAR is looked up in the git config files. If it's set, then its value specify the browser that should be used. CONFIGURATION VARIABLES
CONF.VAR (from -c option) and web.browser The web browser can be specified using a configuration variable passed with the -c (or --config) command line option, or the web.browser configuration variable if the former is not used. browser.<tool>.path You can explicitly provide a full path to your preferred browser by setting the configuration variable browser.<tool>.path. For example, you can configure the absolute path to firefox by setting browser.firefox.path. Otherwise, git web--browse assumes the tool is available in PATH. browser.<tool>.cmd When the browser, specified by options or configuration variables, is not among the supported ones, then the corresponding browser.<tool>.cmd configuration variable will be looked up. If this variable exists then git web--browse will treat the specified tool as a custom command and will use a shell eval to run the command with the URLs passed as arguments. NOTE ABOUT KONQUEROR
When konqueror is specified by a command line option or a configuration variable, we launch kfmclient to try to open the HTML man page on an already opened konqueror in a new tab if possible. For consistency, we also try such a trick if browser.konqueror.path is set to something like A_PATH_TO/konqueror. That means we will try to launch A_PATH_TO/kfmclient instead. If you really want to use konqueror, then you can use something like the following: .ft C [web] browser = konq [browser "konq"] cmd = A_PATH_TO/konqueror .ft Note about git-config --global Note that these configuration variables should probably be set using the --global flag, for example like this: .ft C $ git config --global web.browser firefox .ft as they are probably more user specific than repository specific. See git-config(1) for more information about this. AUTHOR
Written by Christian Couder <chriscool@tuxfamily.org[1]> and the git-list <git@vger.kernel.org[2]>, based on git mergetool by Theodore Y. Ts'o. DOCUMENTATION
Documentation by Christian Couder <chriscool@tuxfamily.org[1]> and the git-list <git@vger.kernel.org[2]>. GIT
Part of the git(1) suite NOTES
1. chriscool@tuxfamily.org mailto:chriscool@tuxfamily.org 2. git@vger.kernel.org mailto:git@vger.kernel.org Git 1.7.1 07/05/2010 GIT-WEB--BROWSE(1)
All times are GMT -4. The time now is 09:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy