---------- Post updated at 06:17 PM ---------- Previous update was at 11:41 AM ----------
OK tried this with limited success. This is the content of my test /etc/samba/smb.conf file:
Here's the output of the running the command suggested by anurag:
Which is great but the smb.conf file remains unchanged. Then I tried the relavant bit from michaels post:
and bingo, the temp_file contains the content of the smb.conf file plus the additional line in the correct place
Thanks chaps
---------- Post updated at 06:23 PM ---------- Previous update was at 06:17 PM ----------
So final script looks like:
Interestingly, the mv command produced an error so I used cp instead but it also deletes the temp_file, didn't think this should happen?
Last edited by barrydocks; 12-29-2010 at 02:45 PM..
Hello,
I need to search in file2 for
class A : public B
{
and insert right after that the content of file1.
I am a bit lost as to which tools (which bash functions, awk...). I should use. Thanks for some directions here.
Regards (1 Reply)
I have a file that I want to split in 2 (with Bourne shell sh) preferably. The file consists of groups of lines separated by newline. The file can vary in length, so I need to check number of groups of text. Here's an example
====EXAMPLE START====
#fruit banana
#color yellow
#surface smooth... (0 Replies)
If I cat a file
And want to go to the first instance of a particular value - what command would I use?
And then from that point where I jumped to search for another value - but only search from that point forward not before the file?
Thanks~ (2 Replies)
this is utterly embarassing :(
after posting here i revisited my files and found that when i used "vi" instead of a gui based editor, i suddenly found that the indentations were in fact wrong :(
sorry about this :( (0 Replies)
Hello, I am using tcsh on AIX.
I would like to write a script that does the following:
1. given an inode, how do I find exactly the name of the file?
I know I could do this using ls -i | grep <inode>
but it returns: <inode> <filename>. I need some string manipulation or something to... (1 Reply)
Hi
I would love a bit of help with a problem im having with a script. I need to insert a line of text which is saved in a variable called $fwInsert into a file whos name is saved in a variable called $server but it needs to be in a certain order.
The file is a forward file for a network and... (12 Replies)
Hello All,
I have following file contents
cat file
#line=aaaaaa
#line=bbbbbb
#line=cccccc
#line=dddddd
line=eeeeee
#comment=11111
#comment=22222
#comment=33333
#comment=44444
comment=55555
Testing script
Good Luck!
I would like to comment line line=eeeeee and insert a new line... (19 Replies)
Hello,
I'm trying to create multiple commands using a variable input from another file but am not getting any successful results.
Basically, file1.txt contains multiple lines with single words:
<file1.txt>
yellow
blue
black
white
I want to create multiple echo commands with these... (8 Replies)
I am trying to use awk to place the contens of a filename in $1 and $2 followed by the data in the text file. Basically, put the filename within the text file. There are over 1000 files in the directory and as of now each file is saved with a unique name but it is not within the file. Thank you... (10 Replies)
Discussion started by: cmccabe
10 Replies
LEARN ABOUT SUSE
lmhosts
LMHOSTS(5) File Formats and Conventions LMHOSTS(5)NAME
lmhosts - The Samba NetBIOS hosts file
SYNOPSIS
lmhosts is the samba(7) NetBIOS name to IP address mapping file.
DESCRIPTION
This file is part of the samba(7) suite.
lmhosts is the Samba NetBIOS name to IP address mapping file. It is very similar to the /etc/hosts file format, except that the hostname
component must correspond to the NetBIOS naming format.
FILE FORMAT
It is an ASCII file containing one line for NetBIOS name. The two fields on each line are separated from each other by white space. Any
entry beginning with '#' is ignored. Each line in the lmhosts file contains the following information:
o IP Address - in dotted decimal format.
o NetBIOS Name - This name format is a maximum fifteen character host name, with an optional trailing '#' character followed by the
NetBIOS name type as two hexadecimal digits.
If the trailing '#' is omitted then the given IP address will be returned for all names that match the given name, whatever the NetBIOS
name type in the lookup.
An example follows:
#
# Sample Samba lmhosts file.
#
192.9.200.1 TESTPC
192.9.200.20 NTSERVER#20
192.9.200.21 SAMBASERVER
Contains three IP to NetBIOS name mappings. The first and third will be returned for any queries for the names "TESTPC" and "SAMBASERVER"
respectively, whatever the type component of the NetBIOS name requested.
The second mapping will be returned only when the "0x20" name type for a name "NTSERVER" is queried. Any other name type will not be
resolved.
The default location of the lmhosts file is in the same directory as the smb.conf(5) file.
FILES
lmhosts is loaded from the configuration directory. This is usually /etc/samba or /usr/local/samba/lib.
VERSION
This man page is correct for version 3 of the Samba suite.
SEE ALSO smbclient(1), smb.conf(5), and smbpasswd(8)AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open
Source project similar to the way the Linux kernel is developed.
The original Samba man pages were written by Karl Auer. The man page sources were converted to YODL format (another excellent piece of Open
Source software, available at ftp://ftp.icce.rug.nl/pub/unix/) and updated for the Samba 2.0 release by Jeremy Allison. The conversion to
DocBook for Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 was done by Alexander Bokovoy.
Samba 3.5 06/18/2010 LMHOSTS(5)