Your code isn't consistent even with similar lines. Remove the semi-colons from the end of the lines. Your 'read' lines aren't the same throughout the script either:
A good method for testing techniques/syntax is to pull just the technique out into a simple 2-3 line script to validate that the code works and then put it into your script.
I have a question about expanding shell variables. Given the following piece of script:
a="Some text"
b="Other text"
for i in a b
do
string1=$i
echo $string1 --> returns 'a'
string2=EXPRESSION_WITH_$i
echo $string2 --> returns 'Some text'
done
... (2 Replies)
I'm new to UNIX. I have to run executables often, and they all have a common prefix "prefix_". Now I'm wondering if I can make an alias where I can type run xyz that will then execute "./prefix_xyz" ?
Thanks in advance. (1 Reply)
I'm having a little trouble with a Solaris package build/install.
I have the following entries in my prototype file...
# Interfaces file - all versions installed and auto linked to installation type...
f none $OPTDIR/config/interfaces.DEV 0444 $OWNER $GROUP
f none... (0 Replies)
Hi all,
I have a series of directories which i open regularly. I want create an alias so that i can pass the direcotry name to alias and then this commands makes Cd to the path i need. COuld you please help on how to create an alias
ex of what i am trying but couldn't succeeded
#alias... (1 Reply)
If one:
$ find -name 'some expression' -type f > newfile
and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory.
I am... (3 Replies)
I am trying to turn this into an alias with no luck. I would then like to put the alias into my bashrc file. I know awk is very picky about quotes. I have tried every version of quotes, single quotes, double quotes, and backslashes that I can think of.
VAR=$(xrandr | awk '$2=="connected"{s=$1}... (3 Replies)
Hi Guys,
aliase uniq get ut=XXX anistr|availyStus|oratate|uniqueid
I want to create aliase but i want xxx as variable.....
run like this
uniq ak123
uniq ak324
uniq ak123
End of the story i want to use variable in aliase command (5 Replies)
s=`awk '{ print $0}' /Applications/Relink.app/z_cloudline.txt`
sed -n '"$s"' /var/mobile/Library/iFile/Bookmarks.plist > /var/mobile/originalip.txt
What is the problem with that code ?
With variable it only outputs:
sed: -e expression #1, char 1: unknown command: `"'
If I use the... (3 Replies)
Heyas
I'm trying to give some information on used variables.
While the first two work fine, the ones starting with a glob (is that the proper term?) fail.
echo ${!TUI_*} ${!RET_*} ${!*_CLI} ${!*\_GUI}
bash: ${!*_CLI}: bad substitution
Same with @ or have them escaped.
I found no... (2 Replies)
I have also some difficulty calling sed to change a word in a file.
sed -i 's/docTitl/Outline ${docTitl}/g' $ofln
Moved to new thread, since it is a different question (3 Replies)