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
lsyncd
LSYNCD(1) Lsyncd LSYNCD(1)NAME
lsyncd - a daemon to continuously synchronize directory trees
SYNOPSIS
config file
*lsyncd* [OPTIONS] CONFIG-FILE
default rsync behaviour
*lsyncd* [OPTIONS] -rsync SOURCEDIR TARGET ...
default rync+ssh bevahiour (moves and deletes through ssh)
*lsyncd* [OPTIONS] -rsyncssh SOURCEDIR TARGETHOST TARGETDIR ...
default direct bevahiour (local file operations/rsync)
*lsyncd* [OPTIONS] -direct SOURCEDIR TARGETDIR ...
DESCRIPTION Lsyncd(1) watches local directory trees through an event monitor interface (inotify, fsevents). It aggregates and combines events for a few
seconds and then spawns one or more processes to synchronize the changes. By default this is rsync(1). Lsyncd is thus a light-weight
asynchronous live mirror solution that is comparatively easy to install not requiring new filesystems or blockdevices and does not hamper
local filesystem performance.
Rsync+ssh is an advanced action configuration that uses a SSH(1) to act file and directory moves directly on the target instead of
retransmitting the move destination over the wire.
Fine-grained customization can be achieved through the CONFIG-FILE. Custom action configs can even be written from scratch in cascading
layers ranging from shell scripts to code written in the LUA(1) language. This way simplicity can be balanced with powerfulness. See the
online manual for details on the CONFIG-FILE http://code.google.com/p/lsyncd/wiki/Lsyncd20Manual
Note that under normal configuration Lsyncd will delete pre-existing files in the target directories that are not present in the respective
source directory.
OPTIONS -delay SECS
Overrides the default delay times.
-help
Show a help message.
-insist
Continues startup even if a startup rsync cannot connect.
-log LEVEL
Controls which kind of events are logged. By default Lsyncd logs Normal and Error Messages. -log scarce will make Lsyncd log Error
messages only. -log all will log all debug messages.
-log Category
Turns on a specific debug message. E.g. -log Exec will log all processes as they are spawned.
-nodaemon
Lsyncd will not detach from the invoker and log as well to stdout/err.
-pidfile FILE
Lsyncd will write its process ID in FILE.
-runner FILE
Makes the Lsyncd core load the part of Lsyncd written in Lua from FILE.
-version
Writes version information and exits.
EXIT STATUS
0
Terminated on a TERM signal(7)-1
Failure (syntax, unrecoverable error condition, internal failure)
SEE ALSO
Online Manual: http://code.google.com/p/lsyncd/wiki/Lsyncd2
VERSION
This man page is for lsyncd(1) version 2.0.5
AUTHOR
Axel Kittenberger, <axkibe@gmail.com> 2010-2011
COPYING
Copyright (C) 2010-2011 Axel Kittenberger. Free use of this software is granted under the terms of the GNU General Public License (GPL)
version 2, or any later version. Free redistrubition of this Documentation (/doc directory) is granted under the terms of the Creative
Commons 3.0 Attribution License (CC-3.0-BY).
Lsyncd 2.0.6 August 2011 LSYNCD(1)