12-30-2010
Post the error you got while using mv command. Before that check for permissions in the smb.conf file that could be the reason as well. cp command should not delete the original file (temp_file, here) hmm..its weird!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: JCR
1 Replies
2. Shell Programming and Scripting
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)
Discussion started by: borgeh
0 Replies
3. Shell Programming and Scripting
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)
Discussion started by: llsmr777
2 Replies
4. Shell Programming and Scripting
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)
Discussion started by: mocca
0 Replies
5. Shell Programming and Scripting
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)
Discussion started by: lastZenMaster
1 Replies
6. Shell Programming and Scripting
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)
Discussion started by: KatieV
12 Replies
7. Shell Programming and Scripting
Im attempting to insert the contents of File1 at a specific point of File2.
File1
AD004 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1
File2
AA001 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1
AB002 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1
AC003 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1
Result
AA001 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1... (13 Replies)
Discussion started by: ncwxpanther
13 Replies
8. Shell Programming and Scripting
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)
Discussion started by: manishdivs
19 Replies
9. Shell Programming and Scripting
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)
Discussion started by: demmel
8 Replies
10. Shell Programming and Scripting
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 MOJAVE
testparm
TESTPARM(1) User Commands TESTPARM(1)
NAME
testparm - check an smb.conf configuration file for internal correctness
SYNOPSIS
testparm [-s] [-h] [-v] [-L <servername>] [-t <encoding>] {config filename} [hostname hostIP]
DESCRIPTION
This tool is part of the samba(7) suite.
testparm is a very simple test program to check an smbd(8) configuration file for internal correctness. If this program reports no
problems, you can use the configuration file with confidence that smbd will successfully load the configuration file.
Note that this is NOT a guarantee that the services specified in the configuration file will be available or will operate as expected.
If the optional host name and host IP address are specified on the command line, this test program will run through the service entries
reporting whether the specified host has access to each service.
If testparm finds an error in the
smb.conf file it returns an exit code of 1 to the calling program, else it returns an exit code of 0. This allows shell scripts to test
the output from testparm.
OPTIONS
-s
Without this option, testparm will prompt for a carriage return after printing the service names and before dumping the service
definitions.
-h|--help
Print a summary of command line options.
-V|--version
Prints the program version number.
-L servername
Sets the value of the %L macro to servername. This is useful for testing include files specified with the %L macro.
-v
If this option is specified, testparm will also output all options that were not used in smb.conf(5) and are thus set to their
defaults.
-t encoding
Output data in specified encoding.
--parameter-name parametername
Dumps the named parameter. If no section-name is set the view is limited by default to the global section. It is also possible to dump
a parametrical option. Therfore the option has to be separated by a colon from the parametername.
--section-name sectionname
Dumps the named section.
configfilename
This is the name of the configuration file to check. If this parameter is not present then the default smb.conf(5) file will be
checked.
hostname
If this parameter and the following are specified, then testparm will examine the hosts allow and hosts deny parameters in the
smb.conf(5) file to determine if the hostname with this IP address would be allowed access to the smbd server. If this parameter is
supplied, the hostIP parameter must also be supplied.
hostIP
This is the IP address of the host specified in the previous parameter. This address must be supplied if the hostname parameter is
supplied.
FILES
smb.conf(5)
This is usually the name of the configuration file used by smbd(8).
DIAGNOSTICS
The program will issue a message saying whether the configuration file loaded OK or not. This message may be preceded by errors and
warnings if the file did not load. If the file was loaded OK, the program then dumps all known service details to stdout.
VERSION
This man page is correct for version 3 of the Samba suite.
SEE ALSO
smb.conf(5), smbd(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 for Samba 3.0 was done by Alexander Bokovoy.
Samba 3.5 06/18/2010 TESTPARM(1)