To re-introduce myself, I'm a router guy trying to learn some scripting from the examples in my work place...
In a ksh script, one of the script guys wrote the following and I am trying to understand it. I'm hoping someone can explain it to me.
The script flow enters a case structure.
Inside the case, one of the options is as follows:
What I "get" is:
the first line removes the string "@RESPONSE //" from $cmd putting the new value in $ADDRESPONSE
I don't understand why the second line is in double bracket but this "seems to me" to be a short hand "if" statement with an "and"
and I would appreciate anyone who can explain what's happening in the two sed commands?
Hi guys can you please help me to understand this code .
tmpArray=(${line//=/ })
Please next time open a new thread in the appropriate forum and use code tags (6 Replies)
Hi All,
Good day, i'm just wondering what is the meaning of this code?
COUNT_EXTRACTED_FILE=`${ECHO_CMD} "${SE_IN_PATH}${SE_IN_FILE}" | ${AWK_CMD} -F"__" '{print $2}'`
Thanks,
-niks(newbie) (2 Replies)
Okay so I am just starting programming c++. I just started started to red "C++ for Dummies yesterday and theres a lot of things I do not understand from this book and this source code especially. I will first post the full source code and then post questions about certain thing, usually what they... (2 Replies)
Hi Guys,
Can someone please explain this code to me. I could figure out it's adding and comparing two fields but I am not sure which ones.
sort -t"|" -k3.1 /tmp/mpcashqc.xtr| awk -F"|" '{CHECKAMT+=$3;BATCHTOT=$4;\
items++}END{for(i in CHECKAMT) if (CHECKAMT!=BATCHTOT)... (6 Replies)
i am not able to understand the following code for awk:
$awk -F"|" '{ kount++}
>END { for (desig in kount)
> print desig,kount }' emp.list
the input file i.e. emp.list is ::
3432| p.k.agrwal |g.m |sales
4566|g.l.sharma |director|production
3433|r shah | g.m | production... (1 Reply)
Hi,
I am trying to convert 32-bit code to 64-bit.
I have defined function
int main()
{
int* l;
size_t len1;
fun(len1);
return 0;
}
void fun(int* ptr)
{
cout<<"\nsizeof(ptr)"<<sizeof(ptr);
}
However while compiling getting error as :
Error: Formal argument ptr... (2 Replies)
Hey,
Could you explain me what this code is doing ?
For example:
$i has value 9
$1 is the name of the file say FILEBkUp
while
do
if $1.`/bin/expr $i - 1` ]
then
mv -f $1.`/bin/expr $i - 1` $1.$i
fi
i=`/bin/expr $i - 1`
done
Thanks... (2 Replies)