11-15-2008
What about the following one-liner?
> cat file63
host example1 {
hardware ethernet 00:00:00:00:00:01;
fixed-address 192.168.135.2;
option subnet-mask 255.255.255.0;
option routers 192.168.135.1;
next-server 192.168.135.210;
filename "linux-install/pxelinux.0";
}
host example2 {
hardware ethernet 00:00:00:00:00:02;
fixed-address 192.168.135.3;
option subnet-mask 255.255.255.0;
option routers 192.168.135.1;
next-server 192.168.135.210;
filename "linux-install/pxelinux.0";
}
host example3 {
hardware ethernet 00:00:00:00:00:03;
fixed-address 192.168.135.4;
option subnet-mask 255.255.255.0;
option routers 192.168.135.1;
next-server 192.168.135.210;
filename "linux-install/pxelinux.0";
}
> cat file63 | tr -s "\n" >file63x ; cp file63x file63 ; rm file63x
> cat file63
host example1 {
hardware ethernet 00:00:00:00:00:01;
fixed-address 192.168.135.2;
option subnet-mask 255.255.255.0;
option routers 192.168.135.1;
next-server 192.168.135.210;
filename "linux-install/pxelinux.0";
}
host example2 {
hardware ethernet 00:00:00:00:00:02;
fixed-address 192.168.135.3;
option subnet-mask 255.255.255.0;
option routers 192.168.135.1;
next-server 192.168.135.210;
filename "linux-install/pxelinux.0";
}
host example3 {
hardware ethernet 00:00:00:00:00:03;
fixed-address 192.168.135.4;
option subnet-mask 255.255.255.0;
option routers 192.168.135.1;
next-server 192.168.135.210;
filename "linux-install/pxelinux.0";
}
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi there
i'm trying to delete blank lines and or lines with spaces only from a series of files in an directory.
to do so, i'm using this:
for files in `ls /users/myname/pesop* 2>/dev/null`
do
grep -v ^$ $files > newfile
mv newfile $files
done
now, this works great for blank lines but... (3 Replies)
Discussion started by: vascobrito
3 Replies
2. Shell Programming and Scripting
I have a text file with blank lines fullfilled with spaces and others only containing the "Enter" caracter, the \012.
I would like to eliminate all them with the sed command.
Is it possible?
making: sed '/^$/d' <file should delete the blank lines but doesn't work for the lines that only... (2 Replies)
Discussion started by: tmxps
2 Replies
3. UNIX for Dummies Questions & Answers
can anyone show me how to delete blank lines from a file.
thanks in advance (2 Replies)
Discussion started by: sachin.gangadha
2 Replies
4. Shell Programming and Scripting
Hello,
Hello Firends,
I have file like below. I want to remove selected blocks say abc,pqr,lst. how can i remove those blocks from file.
zone abc {
blah
blah
blah }
zone xyz {
blah
blah
blah }
zone pqr {
blah
blah
blah } (4 Replies)
Discussion started by: nrbhole
4 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have blank line in the file, I just want to remove trailing blank lines.
There are some blank lines between the lines, i don't want remove those.
Just want to delete blank lines at the end.
I used this command sed '/^$/d' infile > outfile, but it is not removing anything.
I think... (1 Reply)
Discussion started by: visu
1 Replies
6. Shell Programming and Scripting
I have a sed pipeline:
myVar=$(cat $FILE | sed -n '/regex/,/regex/{/regex/d;p}' | sed -n '/regex/!p' | sed -e s/*:// | sed /regex/,+8d \
)
sed '/^$/d'
sed '/./!d'
And i've tried to add that in a different order rather then just on the end..Why isnt it deleting all the blank... (2 Replies)
Discussion started by: omgsomuchppl
2 Replies
7. Shell Programming and Scripting
Hi,
I want to use diff to compare two files in a Perl file. But one of the files has some blank lines at the end. So I want to delete the blank lines from the file firstly and then use diff to compare them. But I dont know how to delete the blank lines from the files. Meanwhile, the system is... (5 Replies)
Discussion started by: Damon_Qu
5 Replies
8. Shell Programming and Scripting
Hi,
Consider a file named "testfile"
The contents of file are as below
first line added for test
second line added for test
third line added for test
fourth line added for test
fifth line added for test (5 Replies)
Discussion started by: anil8103
5 Replies
9. UNIX for Advanced & Expert Users
Hi Gurus,
Somebody can say me how to delete blank spaces and blank lines in a file unix, please.
Thank you for advanced. (10 Replies)
Discussion started by: systemoper
10 Replies
10. UNIX for Beginners Questions & Answers
Hi all,
I'm looking for a way (sed or awk) to delete multiple lines between blank lines containing two patterns ex:
user: alpha
parameter_1 = 15
parameter_2 = 1
parameter_3 = 0
user: alpha
parameter_1 = 15
parameter_2 = 1
parameter_3 = 0
user: alpha
parameter_1 = 16... (3 Replies)
Discussion started by: ce9888
3 Replies
LEARN ABOUT DEBIAN
pbuilder-uml.conf
pbuilder-uml.conf(5) pbuilder pbuilder-uml.conf(5)
NAME
pbuilder-uml.conf - configuration file for user-mode-linux port of pbuilder
DESCRIPTION
/etc/pbuilder/pbuilder-uml.conf contains default values used in pbuilder-user-mode-linux program invocation.
FORMAT
MY_ETH0=tuntap,,,192.168.0.2
Configures ethernet setting used for booting linux. See how rootstrap boots your system, and copy that.
Specify --eth0=slirp,12345,/usr/bin/slirp-fullbolt to use the slirp connection.
UML_IP=192.168.0.3
IP address to use for guest OS.
This can be set to dhcp for obtaining IP address through DHCP.
UML_NETMASK=255.255.255.0
Guest OS netmask
UML_NETWORK=192.168.0.0
Guest OS network
UML_BROADCAST=255.255.255.255
Guest OS broadcast
UML_GATEWAY=192.168.0.1
Guest OS gateway
PBUILDER_UML_IMAGE=${HOME}/uml-image
Guest OS file system image.
UML_MOUNT_TMPFS=no
Whether to mount tmpfs inside the guest image. This is probably mostly useless.
BUILDPLACE=${HOME}/tmp/
The location which build will take place. pbuilder-user-mode-linux will place temporary COW files to there. The user running UML
needs to be able to access that directory.
UML_MEM=128
The amount of memory allowed for UML. Give more value to here.
UML_HOSTNAME=uml-host
The hostname for the UML.
The hostname should be available in /etc/hosts so that hostname -f will be able to return the FQDN.
UML_BUILDRESULT=/directory/of/build/result
The directory where build result of pbuilder-user-mode-linux is stored.
ROOTSTRAP_IMAGESIZE=size-in-megabytes
The size, in MB, of the disk iamge to create. Defaults to 1000.
NOTES
It is advised to set APTCACHEHARDLINK to no in ~/.pbuilderrc. see pbuilderrc(5) for details.
AUTHOR
Initial coding, and main maintenance is done by Junichi Uekawa <dancer@debian.org>.
The homepage is available at http://pbuilder.alioth.debian.org
FILES
/etc/pbuilder/pbuilder-uml.conf, ${HOME}/.pbuilderrc
SEE ALSO
/usr/share/doc/pbuilder/pbuilder-doc.html, pbuilder-user-mode-linux(1), pbuilder(8), pbuilderrc(5), pdebuild(1)
Debian 2003 Jan 8 pbuilder-uml.conf(5)