so i have been trying to learn how to manipulate text on my own and have gotten stumped...
let's say i have a text file that says (highly simplified):
people ordinary
How would swap the order of the words..
I know i need to use sed and some kind of back reference but cannot make it... (2 Replies)
If I have string { I_love_shell_scripts}
anyone knows how to have output {stpircs_llehs_evol_I}
by using shell and perl ?I know in perl, there is reverse() funcation, but
can it be done by not using reverse()? (3 Replies)
I have a text
"abc def ghi"
and I want to get it as
"def abc ghi"
I am using this
echo "abc def ghi" | sed 's/\(*\)\(*\)/\2\1/'
But I am not able to get the output, could anyone help me.
Thanks (9 Replies)
I have files in a folder like ..
citi11082006_1.trn
citi11082006_2.trn
citi11082006_3.trn
...
...
...
citi11082006_13.trn
.,...
citi11082006_nn.trn
Each file will have one string inside and I am builting a master string based out the string in the sub files by merging all into one by... (6 Replies)
Im trying to develop a shell script that will change the content order of the file.
For example I have a file that says
a
b
c
d
I want to change this to be
d
c
b
a
Im trying to use sed to this by reading the file and then inserting each line at the top
#!/usr/bin/ksh
... (3 Replies)
Hi ,
I want to change the order of a string using sed command . Is it possible ?
$echo "abc123xyz" | sed 's/\()*\) \(*\)/\2\1/'
abc123xyz
$ echo "abc123xyz" |sed 's/\()*\) \(*\) \()*\)/\2\1\3/'
abc123xyz
I want to change the string ,
abc123xyz as
xyz123abc .
Is it... (5 Replies)
Hi -
I have a file with lots of lines in that I need to order based on the number of commas!
e.g the file looks something like :-
cn=john,cn=users,cn=uk,dc=dot,dc=com
cn=john,cn=users,dc=com
cn=users,cn=groups,dc=com
cn=john,cn=admins,cn=users,cn=uk,dc=dot,dc=com... (4 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Hello.
I would like to write a bash function which would return "true" if the search succeed else return anything else.
something like
if ] ; then
exit 1
fi
function my_funct () {
find first occurrence $2 in $1
if not found return "false"
from that position,... (6 Replies)
Discussion started by: jcdole
6 Replies
LEARN ABOUT DEBIAN
dancer::cookie
Dancer::Cookie(3pm) User Contributed Perl Documentation Dancer::Cookie(3pm)NAME
Dancer::Cookie - class representing cookies
SYNOPSIS
use Dancer::Cookie;
my $cookie = Dancer::Cookie->new(
name => $cookie_name, value => $cookie_value
);
DESCRIPTION
Dancer::Cookie provides a HTTP cookie object to work with cookies.
ATTRIBUTES
name
The cookie's name.
value
The cookie's value.
expires
The cookie's expiration date. There are several formats.
Unix epoch time like 1288817656 to mean "Wed, 03-Nov-2010 20:54:16 GMT"
A human readable offset from the current time such as "2 hours". It currently understands...
s second seconds sec secs
m minute minutes min mins
h hr hour hours
d day days
w week weeks
M month months
y year years
Months and years are currently fixed at 30 and 365 days. This may change.
Anything else is used verbatim.
domain
The cookie's domain.
path
The cookie's path.
secure
If true, it instructs the client to only serve the cookie over secure connections such as https.
http_only
By default, cookies are created with a property, named "HttpOnly", that can be used for security, forcing the cookie to be used only by the
server (via HTTP) and not by any JavaScript code.
If your cookie is meant to be used by some JavaScript code, set this attribute to 0.
METHODS /SUBROUTINES
new
Create a new Dancer::Cookie object.
You can set any attribute described in the ATTRIBUTES section above.
init
Runs an expiration test and sets a default path if not set.
to_header
Creates a proper HTTP cookie header from the content.
AUTHOR
Alexis Sukrieh
LICENSE AND COPYRIGHT
Copyright 2009-2010 Alexis Sukrieh.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as
published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
perl v5.14.2 2011-11-30 Dancer::Cookie(3pm)