Sponsored Content
Top Forums Shell Programming and Scripting Trouble with setting a variable with vastool Post 302951762 by Scrutinizer on Monday 10th of August 2015 12:07:15 PM
Old 08-10-2015
You need to use command substitution:
Code:
var=$(commands)

This User Gave Thanks to Scrutinizer For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trouble saving variable

Hi, I have problems when you save a variable of a command. I have put the following line: CONEXION_BAGDAD = $ (grep-c "Please login with USER and PASS" $ LOG_FILE_BAGDAD) But I returned the following error: syntax error at line 67: `CONEXION_BAGDAD = $ 'unexpected Because it can happen?... (2 Replies)
Discussion started by: danietepa
2 Replies

2. IP Networking

Trouble setting up a static IP on NetGear DGN1000

I have been trying to setup a static ip, however everytime I do so my internet disconnects and won't connect untill I switch back to dynamic. My router is a NetGear DGN1000 and I'm using it wired. Could anyone help? (0 Replies)
Discussion started by: zomigosh
0 Replies

3. Ubuntu

Trouble setting up Java classpath

Saw an error while setting up an application called i2phex: # ./run.sh java.lang.RuntimeException: Failed to initialize phex.net.repres.i2p.I2PPresentationManager at phex.common.ManagerController.initializeManagers(ManagerController.java:78) at phex.Main.main(Main.java:161)After... (0 Replies)
Discussion started by: Israel213
0 Replies

4. UNIX for Dummies Questions & Answers

Trouble Setting Up Sun Ultra 10 - Displaying Garbage

Hello there, I am new to this forum as well as to the UNIX world. Recently graduated with a degree in Computing and just started learning UNIX & bought 3 Sun Ultra 10 Servers. I was trying to set the Servers up so I can use them; the Servers don't have a VGA card. My laptop, which I would be... (6 Replies)
Discussion started by: frhan2u
6 Replies

5. Shell Programming and Scripting

Having trouble greping a variable

I'm trying to take a users input, and then such a text file to see if it contains it. I get an error when running it: "./Login.sh: Line 8: echo Username read username if ; then echo Login successful. else echo Failed to login. fi If someone could give me some input to where I'm... (4 Replies)
Discussion started by: Hegarz
4 Replies

6. Shell Programming and Scripting

Trouble with passing variable to sed

Here is my code #!/bin/bash username=gnowicki sed '$s/$/ $username/' < sshd_config 1 <> sshd_config what this is supposed to do is take the name gnowicki and put it at the end of the last line of the sshd_config and it works except not using the variable, if I put the name "gnowicki" where... (2 Replies)
Discussion started by: slufoot80
2 Replies

7. Shell Programming and Scripting

Trouble setting up flag ( getopt) for my script

do case $option in d ) CHEC=true;; # more option processing can go here \? ) echo "Unknown option: -$OPTARG" : ) echo "Missing option argument for -$OPTARG";; * ) echo "Unimplimented option: -$OPTARG";; esac done shift $(($OPTIND - 1)) (2 Replies)
Discussion started by: upenmishra
2 Replies

8. UNIX for Dummies Questions & Answers

Trouble setting up a shared folder

I'm trying to set up a folder in my home directory that will be shared with another user but for some reason it is not working this is what I've done, I have tried two different ways using ACL's and chown/chgrp etc I set up a group called say: sharedgroup and added both my user (john) and fred... (3 Replies)
Discussion started by: 14952john
3 Replies

9. Linux

Trouble setting up basic user authentication on apache2 web server

Hey guys! So I decided to set up some basic user authentication on my apache2 server, and I am running into some problems. I followed the documentation provided by apache on their website, but I cant create the password file for some reason. I did a little trouble shooting myself, and found... (40 Replies)
Discussion started by: LinuxIntern445
40 Replies
COLOR.4TH(8)						    BSD System Manager's Manual 					      COLOR.4TH(8)

NAME
color.4th -- FreeBSD color-detection boot module DESCRIPTION
The file that goes by the name of color.4th is a set of commands designed to simplify color logic. The commands of color.4th by themselves are not enough for most uses. Please refer to the examples below for the most common situations, and to loader(8) for additional commands. Before using any of the commands provided in color.4th, it must be included through the command: include color.4th This line is present in /boot/loader.4th file, so it is not needed (and should not be re-issued) in a normal setup. The commands provided by it are: loader_color? Returns FALSE if the loader_color environment variable is set to ``NO'' (case-insensitive) or ``0''. Otherwise returns TRUE (unless booting serial). The environment variables that effect its behavior are: loader_color If set to ``NO'' (case-insensitive) or ``0'', causes loader_color? to return FALSE, indicating to many modules that color should not be used. FILES
/boot/loader The loader(8). /boot/color.4th color.4th itself. /boot/loader.rc loader(8) bootstrapping script. EXAMPLES
Standard i386 /boot/loader.rc: Use color where applicable: loader_color="YES" SEE ALSO
loader.conf(5), loader(8), loader.4th(8) HISTORY
The color.4th set of commands first appeared in FreeBSD 9.0. AUTHORS
The color.4th set of commands was written by Devin Teske <dteske@FreeBSD.org>. BSD
August 6, 2013 BSD
All times are GMT -4. The time now is 08:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy