Before I even attempt this, is it possible to grep for a pattern, maybe a partial sentence like "go to page 3", assign that to a variable and then use awk or something to pull out the 3 and assign it to a variable? So first I would have
Gotopg = "go to page 3"
then
page = 3 (9 Replies)
i'm on a Mac running BSD unix.
i have a script in which i ask the user to input the name of a mounted volume. i then call SED to substitute backslashes and spaces in place of the spaces. that looks like this:
echo "Enter the name of the volume"
read Volume
echo "You've chosen \"$Volume\""... (7 Replies)
Hi,
Is there any way to assign defaults values to the shell variables without reassigning them ( restarting the session)
for example
after login the value of ORACLE_HOME=/a/b/c
i have changed this value from the console
export ORACLE_HOME=/c/d
now what if i want the value exported to... (1 Reply)
Hi GUYS,
I have function. I am assigning a line count to count variable. But it is throwing an error at this line.
function_recur (){
#file being created in this function
lenth = `wc -l function_outpu.dat`;
echo $lenth;
}
this is the error i got
rec.ksh: lenth: not found.
... (3 Replies)
Hi,
I am having a line which is separated by -
I need to extract each field and put into some variable.
a=`echo "this-is-the-case" | awk -F- '{print $1}' `
b=`echo "this-is-the-case" | awk -F- '{print $2}' `
c=`echo "this-is-the-case" | awk -F- '{print $3}' `
d=`echo "this-is-the-case" | awk... (2 Replies)
Hi Gurus,
I have a file named log with 2 lines
Each line is a file name. eg
$ cat log
monday
tuesday
I need to read log and assign each output(filename) to a different variable.
The following doesn't work:-
while read A B
do
echo " a is ${A} "
echo " b is ${B} "
done <... (6 Replies)
Hello,
I am working on setup LDAP Server and facing issue related to assigning user to a group. Below is the LDAP structure i am using.
I have created Users,Groups and Servers ou's and sub ou's added to the same or Users as well as Groups OU.
Logged in as: cn=Manager,dc=bebolabs,dc=net
... (0 Replies)
i have variables RECIPIENTS_DEVL,RECIPIENTS_UACC,RECIPIENTS_PROD
i have a case statement to get the phase variable:
case ${WMD_UPHASE1} in
u) WMD_UPHASE4=UACC;;
i) WMD_UPHASE4=DEVL;;
p) WMD_UPHASE4=PROD;;
d) WMD_UPHASE4=DEVL;;
*) WMD_UPHASE4=DEVL;;
esac
I am unable to... (3 Replies)
Hi,
Can the below be clarified please. i just want to know what is the difference between the two ways of assigning variables as mentioned below.
export SRC_TBL=${SRC_TBL-"MMA_COPAY_PLN_FACT_STG"}
export SRC_TBL="MMA_COPAY_PLN_FACT_STG"
thanks in advance :)
Arun (1 Reply)
OSX 10.9
Good morning/afternoon/evening.
I'm hoping to get some insight on assigning a variable when calling a function. The code below looks at my array and checks if the path exists. My actual code will have multiple arrays and I would like to define a specific array when I call the... (6 Replies)
Discussion started by: sudo
6 Replies
LEARN ABOUT BSD
eqnchar
EQNCHAR(7) Miscellaneous Information Manual EQNCHAR(7)tdefine ciplus % "O" % ndefine ciplus % + % tdefine citimes % "O" % ndefine citimes % x % tdefine =wig % "~" % ndefine =wig % "~" % tdefine
bigstar % "x" % ndefine bigstar % - % tdefine =dot % "." % ndefine =dot % = dot % tdefine orsign % "/" % ndefine orsign % / % tdefine andsign %
"/" % ndefine andsign % / % tdefine =del % "/" % ndefine =del % = to DELTA % tdefine oppA % "" % ndefine oppA % - % tdefine oppE %"-" % nde-
fine oppE % / % tdefine incl % "--" % ndefine incl % _ % tdefine nomem % "/" % ndefine nomem % / % tdefine angstrom % "o" % ndefine angstrom % A
to o % tdefine star %{ roman "*"}% ndefine st/r % * % tdefine || % || % tdefine <wig % ~" % ndefine <wig %{ < from "~" }% tdefine >wig % "~" %
ndefine >wig %{ > from "~" }% tdefine langle % "" % ndefine langle %<% tdefine rangle % "/" % ndefine rangle %>% tdefine hbar % "_" % ndefine
hbar % - % ndefine ppd % | % tdefine ppd % "|" % tdefine <-> % "->" % ndefine <-> % "<-->" % tdefine <=> % "=>" % ndefine <=> % "<=>" % tdefine |<
% "|" % ndefine |< % | % tdefine |> % "|" % ndefine |> % > % tdefine ang % "_" % ndefine ang % _ % tdefine rang % "_" % ndefine rang % L % tdefine
3dot % "." % ndefine 3dot % . % tdefine thf % "..." % ndefine thf % .. % tdefine quarter % roman 1/4 % ndefine quarter % 1/4 % tdefine 3quarter %
roman 3/4 % ndefine 3quarter % 3/4 % tdefine degree % o % ndefine degree % nothing sup o % tdefine square % [] % ndefine square % [] % tdefine
circle % O % ndefine circle % O % tdefine blot % "[]" % ndefine blot % X % tdefine bullet % o % ndefine bullet % e % tdefine -wig % "~=" % ndefine
-wig % - to "~" % tdefine wig % ~ % ndefine wig % "~" % tdefine prop % oc % ndefine prop % oc % tdefine empty % {} % ndefine empty % / % tdefine
member % E % ndefine member % - % tdefine cup % U % ndefine cup % U % define cap % (^) % define subset % (= % define supset % =) % define !subset
% (_ % define !supset % _) %
NAME
eqnchar - special character definitions for eqn
SYNOPSIS
eqn /usr/pub/eqnchar [ files ] | troff [ options ]
neqn /usr/pub/eqnchar [ files ] | nroff [ options ]
DESCRIPTION
Eqnchar contains troff and nroff character definitions for constructing characters that are not available on the Graphic Systems typeset-
ter. These definitions are primarily intended for use with eqn and neqn. It contains definitions for the following characters
"ciplus" ciplus "||" || "square" square
"citimes" citimes "langle" langle "circle" circle
"wig" wig "rangle" rangle "blot" blot
"-wig" -wig "hbar" hbar "bullet" bullet
">wig" >wig "ppd" ppd "prop" prop
"<wig" <wig "<->" <-> "empty" empty
"=wig" =wig "<=>" <=> "member" member
"star" star "|<" |< "nomem" nomem
"bigstar" bigstar "|>" |> "cup" cup
"=dot" =dot "ang" ang "cap" cap
"orsign" orsign "rang" rang "incl" incl
"andsign" andsign "3dot" 3dot "subset" subset
"=del" =del "thf" thf "supset" supset
"oppA" oppA "quarter" quarter "!subset" !subset
"oppE" oppE "3quarter" 3quarter "!supset"!supset
"angstrom" angstrom "degree" degree
FILES
/usr/pub/eqnchar
SEE ALSO troff(1), eqn(1)3rd Berkeley Distribution May 20, 1985 EQNCHAR(7)