10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have a moderate size (300 lines) BASH Shell script that performs various tasks on different source reports (CSV files). One of the tasks that it performs, is to use SED to replace 'non-conforming' titles with conformant ones. For example "How to format a RAW Report" needs to become... (3 Replies)
Discussion started by: richardsantink
3 Replies
2. Shell Programming and Scripting
OK, I'm striving to abide by all the rules this time.
Here is a fragment of my windows10/cygwin64/bash script:
export BUPLOG=$(BackupRecords --log "$src")
robocopy $(BackupRecords -mrbd "$src" --path "$src") $(BackupRecords --appSwitches "$src") "$src" "$dst" $(BackupRecords --fileSwitches... (0 Replies)
Discussion started by: siegfried
0 Replies
3. UNIX for Dummies Questions & Answers
$ ABCel='abc@gmail.com'
$ XYZel='xyz@gmail.com'
$ MYel='my@yahoo.com'
$ echo $ABCel
abc@gmail.com
$ echo $XYZel
xyz@gmail.com
$ echo $MYel
my@yahoo.com
I tried 3 variations, but not getting the expected result:
$ for VAR in ABC XYZ; do echo -e "${VAR}el $MYel"; done
ABCel... (1 Reply)
Discussion started by: bagnoble
1 Replies
4. Shell Programming and Scripting
I have one script calling another with a set of strings that includes white space. Script A calls Script B with these input strings: one two "th ree"
Script B pulls apart the arguments correctly:
arg0 = one, arg1 = two, arg2 = "th ree"
if I call it from within Script A like so:... (10 Replies)
Discussion started by: skippyV
10 Replies
5. Shell Programming and Scripting
Hello!
I'm writing a shell script using #!/bin/bash instead of #!/bin/sh because of the substitution: ${!variable}, which won't work with sh. My main problem is the following (just a summarized example, the script is much more complex):
# sourced from a configuration file, we have a lot of... (6 Replies)
Discussion started by: teresaejunior
6 Replies
6. Shell Programming and Scripting
Hi,
I am generating html code using cshell, but i am having one problem while printing double quotes,
I need to write following code in file. where $var contains list of web address
<a href="$var">$var</a>
So i am using
echo "<a href="$var">$var</a>" > file.html
But with this " in... (4 Replies)
Discussion started by: sarbjit
4 Replies
7. Shell Programming and Scripting
Is it possible with a bash variable to perform multiple substitution strings to one variable?
I have this variable:
echo $clock
TIMEZONE="US/Central"
What I would like to do with bash only it pull out just the "US" part of the variable.. which could be any number of countries.
this is... (6 Replies)
Discussion started by: trey85stang
6 Replies
8. Shell Programming and Scripting
Hello,
I would like to dual subtitutes variables.
I tried
$serv="combo"
combo_TYPE="mop"
TYPENAME="$serv_TYPE"
Now, I'd like to get "mop" from TYPENAME
echo "${${TYPENAME}}"
I have a bad substitution error
:) (1 Reply)
Discussion started by: pppswing
1 Replies
9. Shell Programming and Scripting
Hi
I have a variable whose value is like this
i=/test/test1/test2/myfile.cd.070505123457
i would like to have the value of myfile.cd stored into another variable
my attempt is
test=${i##*/} ;echo $test ##and i get
myfile.cd.070505123457
since what i wnat is myfile.cd i try this... (19 Replies)
Discussion started by: xiamin
19 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I want to substitute variable in sed using combination of name and var_$name:
name=Tom
var_$name=1
sed -n "${var_"$name"}"p < myfile
but it doesn't work, do you know what's wrong ?
Thanks (1 Reply)
Discussion started by: asal_email2
1 Replies