Sponsored Content
Top Forums Shell Programming and Scripting [Solved] Output in bash script not captured in variable Post 302498781 by bakunin on Tuesday 22nd of February 2011 12:07:38 PM
Old 02-22-2011
Even if this problem occurs on an AIX system it is a shell scripting problem. I'm going to transfer this thread to the appropriate subforum therefore.

Moderator's Comments:
Mod Comment Thread transferred


bakunin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Informix function return value needs to be captured in shell script

I need to run a 4ge from within my shell script and capture the string value that is being returned into a unix variable. I have tried the back ticks to no avail. I know it is returning because I did get the returned value to go to my screen at one point.. What I have is: sendlist =... (3 Replies)
Discussion started by: jeniferz
3 Replies

2. Shell Programming and Scripting

assign awk output to bash variable

greetings all, I am have a heck of a time trying to accomplish a very simple thing. I have an array of "shortname<spaces>id" created from a dscl output. I want to assign shortname=word1 and id=word2. I have tried shortname=$(${textArray} | awk '{print $1}') - and get 'awk : cannot open... (3 Replies)
Discussion started by: macnetdaemon
3 Replies

3. Shell Programming and Scripting

[SOLVED] how to use my aliases in a bash script

Hi, I confess to be stuck ... as explained here Aliases - Bash Reference Manual I added shopt -s expand_aliasesto my script ... but it didn't work. Later I've read I had to add this at the begning of my my script : . ~/.bash_aliases(of course my aliases are in this file) but again, the... (0 Replies)
Discussion started by: xib.be
0 Replies

4. Shell Programming and Scripting

In bash script, how to assign output of a command to a variable while keeping tabs?

Hi, wondering if it's been asked before but didn't find matches from google. Basically I have this line: myvar=$(echo -e "a\tb") Now somehow the '\t' from the echo output gets replaced with white space and then stored in $myvar. It creates a problem for me later to use tab as delimiter to do... (2 Replies)
Discussion started by: birddie
2 Replies

5. Shell Programming and Scripting

[Solved] Using SSH in bash script

Hello, I am writing a script that has to log in to X number of servers over a full C class range. I am only keyed on a certain number of these servers and this can change from time to time. The part of my script that deals with this is for i in $(cat $server_list); do ssh ... (0 Replies)
Discussion started by: colinireland
0 Replies

6. UNIX for Dummies Questions & Answers

Solved: how to save an output to a variable

i want to save the output of /scripts/whoowns domain.com to a username like $user = /scripts/whoowns domain.com but I'm not sure how to do that This is inside a bash script how can I get the output of /scripts/whoowns then save that to a variable? thanks! ---------- Post updated at... (0 Replies)
Discussion started by: vanessafan99
0 Replies

7. Shell Programming and Scripting

[SOLVED] Capturing output in a korn variable

Hi, I'm new to korn and having trouble capturing the text output from one program in an array that I can then feed into another program. Direct approaches didn't work, so I've tried to break it down thus: The program lonlat2pixline gives the values I need in the second column, so I print that... (4 Replies)
Discussion started by: daurin
4 Replies

8. Shell Programming and Scripting

cannot pass a echo output to a variable in bash

Hi, I have a problem with passing a echo output into a variable in bash file='1990.tar' NAME='echo $file | cut -d '.' -f1'; echo $NAME the result is echo $file | cut -d . -f1 however with this one,#!/bin/bash file='1990.tar' echo $file | cut -d '.' -f1 the result is what I... (2 Replies)
Discussion started by: 1988PF
2 Replies

9. UNIX for Dummies Questions & Answers

[Solved] Grep in bash script

Hi Experts, I'm writing script to find out last files and its modified date - unfortunately am having problem with the below script. Error message: "grep: sales.txt: No such file or directory" #!/bin/bash var=1 var1=`awk '{n++} END {print n}' sales.txt` while ] do prod=$var... (6 Replies)
Discussion started by: parpaa
6 Replies

10. UNIX for Beginners Questions & Answers

How do I assign the output of a command to a variable within a loop in bash?

In the else of the main if condition . else set lnk = $(readlink -f <path> | cut -d '/' -f7) echo "$lnk" if ] When I run the above on command line , the execution seems to be fine and I get the desired output. But when I try to assign it to a variable within a loop... (12 Replies)
Discussion started by: sankasu
12 Replies
bsetroot(1)						      General Commands Manual						       bsetroot(1)

NAME
bsetroot - blackbox utility to change root window appearance SYNOPSIS
bsetroot -help bsetroot [ -display display ] -solid color bsetroot [ -display display ] -mod x y -fg color -bg color bsetroot [ -display display ] -gradient texture -from color -to color DESCRIPTION
Bsetroot is a utility that can control the appearance of the root window in three ways: Either give it a solid color, or write a two color modula pattern to it, or render a gradient texture, based on two different colors. Bsetroot resembles xsetroot(1) in this functionality but it supports multiple screen displays, and gradient textures the same way as Black- box does. It doesn't handle cursors etc. Bsetroot is part of the Blackbox package. OPTIONS
Bsetroot operates in three ways, you must choose one of the first 3 options: -solid color Sets the root window to specified color. -mod x y Creates a modula pattern. You must specify -bg and -fg colors. -gradient texturestring Renders the specified texture string to the root window. For possible texture strings, please refer to blackbox(1). You must also specify both a -from and a -to color. -display display Tells Bsetroot to connect to the specified display. -bg, -background color Background color. Needed for -mod patterns. -fg, -foreground color Foreground color. Needed for -mod patterns. -from color Start color for rendering textures. Needed for -gradient operation mode. -to color Ending color for rendering textures. Needed for -gradient operation mode. -help Prints version info and short help text. AUTHOR
Bsetroot was written and maintained by Brad Hughes (blackbox@alug.org) and Jeff Raven (jraven@psu.edu). SEE ALSO
blackbox(1) 0.60.3 June 16th, 2000 bsetroot(1)
All times are GMT -4. The time now is 03:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy