03-29-2007
That's exactly what I wanted!
Thank you all for your quick response!!!
Cheers
Steve
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How do I change directories to a path given by input variable in Korn Shell?
e.g. I tired with the Korn Shell below but it doesn't work.
----------------------------------
#!/bin/ksh
echo "Enter folder name: \c"
read folder
cd $folder
----------------------------------
Any help will... (5 Replies)
Discussion started by: stevefox
5 Replies
2. Shell Programming and Scripting
Hi,
I am working on a command that replaces some occurrences of quotation marks in file. The quotation mark cannot be the first or the last character in line and cannot be preceded or followed by a comma.
I am not an expert in regular expressions, but I managed to create the following... (2 Replies)
Discussion started by: piooooter
2 Replies
3. Shell Programming and Scripting
Hey all.
Easy question.
I have a (ksh) varaible x. It contains the following (for example): N557788
I want to replace the "N" with a "-".
I've done this before but for the life of me I cannot remember how I did it.
Thanks.
mtw (2 Replies)
Discussion started by: mixxamike
2 Replies
4. Shell Programming and Scripting
Hi all,
I need a Korn Shell script that will go out to all Unix Servers and pull all non humans IDs from them while at the same time produce a file to show which servers we have access to and which ones we don't.
Thanks in advance. (5 Replies)
Discussion started by: vinsara
5 Replies
5. UNIX for Dummies Questions & Answers
Can we able to replace the character # in banner command with some other characters. Can we able to blink the character in Kornshell (1 Reply)
Discussion started by: sivakumar.rj
1 Replies
6. Shell Programming and Scripting
If I have a string defined as:
MyString=abcde
echo $MyString
How can I loop through it character by character? I haven't been able to find a way to index the string so that I loop through it.
shew01 (10 Replies)
Discussion started by: shew01
10 Replies
7. Shell Programming and Scripting
I have a file called vm.cfg which looks like follows
# cat vm.cfg
acpi = 1
apic = 1
builder = 'hvm'
device_model = '/usr/lib/xen/bin/qemu-dm'
disk =
kernel = '/usr/lib/xen/boot/hvmloader'
memory = '300'
name = 'vm_temp'
on_crash = 'restart'
on_reboot = 'restart'
pae = 1
serial =... (5 Replies)
Discussion started by: pinga123
5 Replies
8. Shell Programming and Scripting
Hi guys , i need help so bad on this issue..
Basically i have to delete the line continuation symbol of first column variable and add the truncated part of that word in next line to first line.
here i written sample 3 lines but originally i have bunch of lines in that file.
client1_day- ... (3 Replies)
Discussion started by: chrismorgan
3 Replies
9. Shell Programming and Scripting
#! /bin/ksh
while read line
do
if ] ; then
echo "no data"
continue;
fi
echo "performing operation on $line"
done < prg.txt (3 Replies)
Discussion started by: Juhi Kashyap
3 Replies
10. Shell Programming and Scripting
I am attempting to write a korn shell script that does the following, but I am getting errors. I'm new to korn shell scripting and am not sure what I am doing wrong. Please help with example scripts. Thanks.
1) check for day of the week
2) if day of the week is Monday then check for the... (4 Replies)
Discussion started by: ijmoore
4 Replies
LEARN ABOUT DEBIAN
dancer::response
Dancer::Response(3pm) User Contributed Perl Documentation Dancer::Response(3pm)
NAME
Dancer::Response - Response object for Dancer
SYNOPSIS
# create a new response object
Dancer::Response->new(
status => 200,
content => 'this is my content'
);
Dancer::SharedData->response->status; # 200
# fetch current response object
my $response = Dancer::SharedData->response;
# fetch the current status
$response->status; # 200
# change the status
$response->status(500);
PUBLIC API
new
Dancer::Response->new(
status => 200,
content => 'my content',
headers => HTTP::Headers->new(...),
);
create and return a new Dancer::Response object
current
my $response = Dancer::SharedData->response->current();
return the current Dancer::Response object, and reset the object
exists
if ($response->exists) {
...
}
test if the Dancer::Response object exists
content
# get the content
my $content = $response->content;
my $content = Dancer::SharedData->response->content;
# set the content
$response->content('my new content');
Dancer::SharedData->response->content('my new content');
set or get the content of the current response object
status
# get the status
my $status = $response->status;
my $status = Dancer::SharedData->response->status;
# set the status
$response->status(201);
Dancer::SharedData->response->status(201);
set or get the status of the current response object
content_type
# get the status
my $ct = $response->content_type;
my $ct = Dancer::SharedData->response->content_type;
# set the status
$response->content_type('application/json');
Dancer::SharedData->response->content_type('application/json');
set or get the status of the current response object
pass
$response->pass;
Dancer::SharedData->response->pass;
set the pass value to one for this response
has_passed
if ($response->has_passed) {
...
}
if (Dancer::SharedData->response->has_passed) {
...
}
test if the pass value is set to true
halt
Dancer::SharedData->response->halt();
$response->halt;
halted
if (Dancer::SharedData->response->halted) {
...
}
if ($response->halted) {
...
}
header
# set the header
$response->header('X-Foo' => 'bar');
Dancer::SharedData->response->header('X-Foo' => 'bar');
# get the header
my $header = $response->header('X-Foo');
my $header = Dancer::SharedData->response->header('X-Foo');
get or set the value of a header
headers
$response->headers(HTTP::Headers->new(...));
Dancer::SharedData->response->headers(HTTP::Headers->new(...));
return the list of headers for the current response
headers_to_array
my $headers_psgi = $response->headers_to_array();
my $headers_psgi = Dancer::SharedData->response->headers_to_array();
this method is called before returning a PSGI response. It transforms the list of headers to an array reference.
perl v5.14.2 2012-01-28 Dancer::Response(3pm)