There's no w nor d in your first specification - I reckon you mean x and y ? And, you don't seem to care for the character position, a w in any position will make that respective file a candidate for the modifications.
How about
If happy with the results, run / source the remove_old_files.sh script (after having set the correct permissions, of course)
Hi,
I'm a newbi in shell script. Here what I want to do:
FileA:
bor bor bor
xxxx
bib bib bi
FileB:
something something
something
I want to replace string "xxxx" in FileA with contents of FileB.
i tried with sed:
fileb=`cat FileB`
reg=xxxx
file=FileA (4 Replies)
Hi,
How to add string inside the file. In this case adding 63 in the beginning of each line. Thnks.
e.g. what is inside the file
Mobile Number Portability
9051151234
9051261345
9051393245
9051412345
9051507654
should like this as output:
Mobile Number Portability (7 Replies)
Hi all,
I am working on a small prog..
i have a file.txt which contains random data...
K LINES V4 ADD CODE `COMPANY` ADD CODE `DISTRIBUTOR` SEQ NAME^K LINES V5 SEQ NAME^K LINES V6 ADD `PACK-LDATE` SEQ NAME^K^KCOMMAND END^KHEADINFO... (1 Reply)
hi
I have template file my.tpl:
bla-bla-bla
<link href="style.css" type="text/css">
bla-bla-bla
and style.css :
body{margin: 0px;}
I want to get in result one file:
bla-bla-bla
<script>body{margin: 0px;}</script>
bla-bla-bla
I tryed to used SED:
sed '/<link .*href=\"(*)*\"... (6 Replies)
We have two files
file 1: (usually small, ~100 lines), each line contains a : separated index, value e.g
2: Apple
1: Banana
5: Pear
7: Orange
File 2: (usually large, 10 million lines or more), each line contains a single string value. e.g
xyz1
xyz2
xyz3
xyz4
xyz5
xyz6
xyz7
Now... (2 Replies)
hi all,
i had the below script
x=`cat input.txt |wc -1`
awk 'NR>1 && NR<'$x' ' input.txt > output.txt
by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Hello,
I'm using Windows 7 ; sed, awk and gnuwin32 are installed.
I have a big text file I need to manipulate.
In short, I will have to split it in thousands of short files, then rename and save in a folder which name is based upon filename.
Here is a snippet of my big input.txt file (this... (4 Replies)
Hello everybody,
I would like modify some strings using sed or another command line with the content file.
For example:
- {fqdn: "server-01" , ip: "server-01"}
- {fqdn: "server-02" , ip: "server-02"}
- {fqdn: "server-03" , ip: "server-03"}
- {fqdn: "server-04" , ip: "server-04"}
My... (4 Replies)
Discussion started by: dco
4 Replies
LEARN ABOUT DEBIAN
dbus-uuidgen
dbus-uuidgen(1) General Commands Manual dbus-uuidgen(1)NAME
dbus-uuidgen - Utility to generate UUIDs
SYNOPSIS
dbus-uuidgen [--version] [--ensure[=FILENAME]] [--get[=FILENAME]]
DESCRIPTION
The dbus-uuidgen command generates or reads a universally unique ID.
Note that the D-Bus UUID has no relationship to RFC 4122 and does not generate UUIDs compatible with that spec. Many systems have a sepa-
rate command for that (often called "uuidgen").
See http://www.freedesktop.org/software/dbus/ for more information about D-Bus.
The primary usage of dbus-uuidgen is to run in the post-install script of a D-Bus package like this:
dbus-uuidgen --ensure
This will ensure that /var/lib/dbus/machine-id exists and has the uuid in it. It won't overwrite an existing uuid, since this id should
remain fixed for a single machine until the next reboot at least.
The important properties of the machine UUID are that 1) it remains unchanged until the next reboot and 2) it is different for any two run-
ning instances of the OS kernel. That is, if two processes see the same UUID, they should also see the same shared memory, UNIX domain
sockets, local X displays, localhost.localdomain resolution, process IDs, and so forth.
If you run dbus-uuidgen with no options it just prints a new uuid made up out of thin air.
If you run it with --get, it prints the machine UUID by default, or the UUID in the specified file if you specify a file.
If you try to change an existing machine-id on a running system, it will probably result in bad things happening. Don't try to change this
file. Also, don't make it the same on two different systems; it needs to be different anytime there are two different kernels running.
The UUID should be different on two different virtual machines, because there are two different kernels.
OPTIONS
The following options are supported:
--get[=FILENAME]
If a filename is not given, defaults to localstatedir/lib/dbus/machine-id (localstatedir is usually /var). If this file exists and
is valid, the uuid in the file is printed on stdout. Otherwise, the command exits with a nonzero status.
--ensure[=FILENAME]
If a filename is not given, defaults to localstatedir/lib/dbus/machine-id (localstatedir is usually /var). If this file exists then
it will be validated, and a failure code returned if it contains the wrong thing. If the file does not exist, it will be created
with a new uuid in it. On success, prints no output.
--version
Print the version of dbus-uuidgen
AUTHOR
See http://www.freedesktop.org/software/dbus/doc/AUTHORS
BUGS
Please send bug reports to the D-Bus mailing list or bug tracker, see http://www.freedesktop.org/software/dbus/
dbus-uuidgen(1)