?

Log in

No account? Create an account
entries friends calendar profile adric.net Previous Previous Next Next
Bash scripting madness - nil.enroll(aetheric_username, quantum_class_id)
yljatlhQo'! QIch lo'laltbebej!
adric
adric
Bash scripting madness
As in it's driving me mad, not like we're having a sale or anything...
How do you set an environment variable's value to the output of a command?
It seems like this would work, but it doesn't:
set LIST=`ls | grep -v dump`
Nor does this, even though the Advanced Bash Scripting Guide suggests it here in lesson 12-15:
output=$(sed -n /"$1"/p $file) # Command substitution.

My code snippet:

#!/bin/bash

#get date
set DATE = $(date +%b%d%Y)

#get repo list
set REPOS = $(ls | grep -v dump)

echo date: $DATE repos list: $REPOS

gives:
date: repos list:
1 comment or Leave a comment
Comments
suri From: suri Date: September 20th, 2005 01:59 am (UTC) (Link)
Gee, and I thought tonight's discussion on % of WIP going into FOH based as indirect or direct labor was complicated!

Good luck!
1 comment or Leave a comment