10-30-2013
Unfortunately, I'm not at the level where I can make use of your advice...
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have a variable say var1 (output from somewhere, which I can't change)which store something like this:
echo $var1
name=fred
age=25
address="123 abc"
password=pass1234
how can I make the variable $name, $age, $address and $password contain the info?
I mean do this in a... (1 Reply)
Discussion started by: freddy1228
1 Replies
2. Shell Programming and Scripting
Hello,
I would like to define a variable based on another variable:
a=5
b$a=100
This does not work. What is the right way to do it?
Thanks
---------- Post updated at 07:37 PM ---------- Previous update was at 07:33 PM ----------
Found my answer with the search function (did not... (0 Replies)
Discussion started by: jolecanard
0 Replies
3. Shell Programming and Scripting
Hi, Unix Gurus,
In our existing file, there is a script like
#!/bin/sh
step=${1:-0}
cur_step=10
if
...
My question is what's "${1:-0}" mean? I know it defines a variable but I don't know what's (1:-0) mean?
:wall:
Thanks in advance. (2 Replies)
Discussion started by: ken002
2 Replies
4. Shell Programming and Scripting
HI
I have file A.txt
_1A
_2A
_3A
_4A
I want define all as different variable.
$1A=_1A
$2B=_2A
$3C=_3A
$4D=_4A
Now i can use any variable in my script. (3 Replies)
Discussion started by: pareshkp
3 Replies
5. Shell Programming and Scripting
All,
Have a weird issue where i need to generate a report from GitHub monthly detailing user accounts and the last time they logged in. I'm using a windows box to do this (work issued) and would like to know if anyone has any experience scripting for GitAPI using windows / cygwin / powershell?... (9 Replies)
Discussion started by: ChocoTaco
9 Replies
6. Shell Programming and Scripting
Dear Shell script Experts,
I am working on shell script which is defined here, qsub_seq.csh . The purpose of this script is to read few input files (with defined starting index and last index) and make processing faster over server.
For some task, I had 1064 of input files, so I wrote another... (8 Replies)
Discussion started by: emily
8 Replies
7. Shell Programming and Scripting
I am trying to automate editing of a json file using bash script.
The file I initially receive is
{
"appMap": {
"URL1": {
"name": "a"
},
"URL2": {
"name": "b"
},
"URL3": {
"name": "c"
},
}
WHat I would like to do is replace... (5 Replies)
Discussion started by: Junaid Subhani
5 Replies
8. Shell Programming and Scripting
Hello guys,
I want to parse a JSON file in order to get the data in a table form.
My JSON file is like this:
{
"document":{
"page":
},
{
"column":
}
]
},
{
... (6 Replies)
Discussion started by: Gescad
6 Replies
9. Shell Programming and Scripting
Hello.
I'm new to bash script and I'm learning the basics by writing some scripts.
Recently a friend of mine asked me if I could try to write a script to him to automate a couple of processes that uses JSON RPCs.
I'll try to explain in few words the workflow just to contextualize the problem.... (48 Replies)
Discussion started by: psysc0rpi0n
48 Replies
LEARN ABOUT DEBIAN
aspect::advice::around
Aspect::Advice::Around(3pm) User Contributed Perl Documentation Aspect::Advice::Around(3pm)
NAME
Aspect::Advice::Around - Execute code both before and after a function
SYNOPSIS
use Aspect;
around {
# Trace all calls to your module
print STDERR "Called my function " . $_->sub_name . "
";
# Lexically alter a global for this function
local $MyModule::MAXSIZE = 1000;
# Continue and execute the function
$_->run_original;
# Suppress exceptions for the call
$_->return_value(1) if $_->exception;
} call qr/^ MyModule::w+ $/;
DESCRIPTION
The "around" advice type is used to execute code on either side of a function, allowing deep and precise control of how the function will
be called when none of the other advice types are good enough.
Using "around" advice is also critical if you want to lexically alter the environment in which the call will be made (as in the example
above where a global variable is temporarily changed).
This advice type is also the most computationally expensive to run, so if your problem can be solved with the use of a different advice
type, particularly "before", you should use that instead.
Please note that unlike the other advice types, your code in "around" is required to trigger the execution of the target function yourself
with the "proceed" method. If you do not "proceed" and also do not set either a "return_value" or "exception", the function call will
return "undef" in scalar context or the null list "()" in list context.
AUTHORS
Adam Kennedy <adamk@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2010 Adam Kennedy.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-02-01 Aspect::Advice::Around(3pm)