10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Discussion started by: An0mander
2 Replies
2. Programming
Hi,
I am not a C programmer. The only C exposure I have is reading and completing the exercises from the C (ANSI C ) Programming Language book:o
At the moment, I am using the UNIX strings command to extract information for a binary file and grepping for a particular string and the value... (3 Replies)
Discussion started by: newbie_01
3 Replies
3. Shell Programming and Scripting
Hi Forum.
I did some google search on what I'm trying to do but I cannot get my code to work correctly. I have 2 files which are very large and I want to read text from file1 and search in file2 - if present, keep the records.
I've tried fgrep -f file1 file2 but it is too slow.
File1:... (10 Replies)
Discussion started by: pchang
10 Replies
4. Shell Programming and Scripting
Dear all,
I have a number of files and each file has two sections separated by a blank line. At the top section, I have lines which describes the values of the alphabetical characters,
# s #; 0.123
# p #; 12.3
# d #; -2.33
# f #; 5.68
<blank line>
sssssss
spfdffff
sdfffffff
Now I... (4 Replies)
Discussion started by: sasharma
4 Replies
5. Shell Programming and Scripting
Hi Frnds...
I have an input file name.txt and another file named as source.. name.txt is having only one column and source is having around 25 columns...i need to read from name.txt line by line and search it in source file and then save the result in results file..
I have a rough idea about the... (15 Replies)
Discussion started by: ektubbe
15 Replies
6. Shell Programming and Scripting
hello
i have two files
temp.txt
and temp_unique.text
the second file consists the unique fields from the temp.txt file
the strings stored are in the following form
4,4
17,12
15,65
4,4
14,41
15,65
65,89
1254,1298i'm able to run the following script to get the total count of a... (3 Replies)
Discussion started by: vaibhavkorde
3 Replies
7. Shell Programming and Scripting
The following is a piece of code to rename LOG_FILE_NEW to LOG_FILE once you get a result (either RUNNING or SHUTDOWN)
RESULT=""
sleep 30
while ; do
sleep 10
RESULT=`sed -n '/RUNNING/'p ${LOG_FILE_NEW}`
if ; then
RESULT=`sed -n '/SHUTTING_DOWN/'p ${LOG_FILE_NEW}`
fi
done
mv... (3 Replies)
Discussion started by: sonorous
3 Replies
8. Shell Programming and Scripting
Hi,
I have two files with the format shown below. I need to read first field(value before comma) from file 1 and search for a record in file 2 that has the same value in the field "KEY=" and write the complete record of file 2 with corresponding field 2 of the first file in to result file.
... (11 Replies)
Discussion started by: King Kalyan
11 Replies
9. Shell Programming and Scripting
file1: has all words to be searched.
100007
200999
299997
File2: has all file names to be searched.
C:\search1.txt
C:\search2.txt
C:\search3.txt
C:\search4.txt
Outfile: should have all found lines.
Logic: Read each word in file1 and search each file in the list of File2; if the... (8 Replies)
Discussion started by: clem2610
8 Replies
10. Shell Programming and Scripting
I am attempting to itterate through a file that has multiple lines and for each one read the entire line and use the value then to search in other files. The problem is that instead of an entire line I am getting each word in the file set as the value I am searching for. For example in File 1... (2 Replies)
Discussion started by: run_unx_novice
2 Replies
sendmail(4) File Formats sendmail(4)
NAME
sendmail, sendmail.cf, submit.cf - sendmail configuration files
SYNOPSIS
/etc/mail/sendmail.cf
/etc/mail/submit.cf
DESCRIPTION
The sendmail.cf and submit.cf files are the configuration files for sendmail(1M). Starting with version 8.12 of sendmail, which was shipped
with version 9 of the Solaris operating system, two configuration files are used for submission and transmission of mail, instead of only
sendmail.cf, as before. These are:
sendmail.cf Remains the principal sendmail configuration file. Used for the Mail Transmission Agent (MTA).
submit.cf Used for the Mail Submission Program (MSP). The MSP is used to submit mail messages. Unlike the MTA, it does not run as an
SMTP daemon.
The MSP does not require root privileges, thus the two-file model provides better security than the pre-sendmail 8.12 model, in which the
MSP ran as a daemon and required root privileges.
In the default sendmail configuration, sendmail uses submit.cf, as indicated in ps(1) output. In ps output, you will observe two sendmail
invocations, such as the ones below:
/usr/lib/sendmail -Ac -q15m
/usr/lib/sendmail -bd -q15m
The first indicates the use of submit.cf, with the client queue (/var/spool/clientmqueue) being checked--and, if needed, flushed--every 15
minutes. The second invocation runs sendmail as a daemon, waiting for incoming SMTP connections.
As shipped, sendmail.cf and, in particular, submit.cf, are appropriate for most environments. Where a knowledgeable system administrator
needs to make a change, he should use the following procedures.
For sendmail.cf:
1. Change directories to the directory that contains the source files for the configuration files.
# cd /etc/mail/cf/cf
2. Create a copy of the sendmail file for your system.
# cp sendmail.mc `hostname`.mc
3. Edit `hostname`.mc. Make changes suitable for your system and environment.
4. Run make to generate the configuration file.
# /usr/bin/make `hostname`.cf
5. Copy the newly generated file to its correct location.
# cp `hostname`.cf /etc/mail/sendmail.cf
6. Restart the sendmail service.
# svcadm restart sendmail
You must restart sendmail for sendmail.cf file changes to take effect, as indicated in step 6. Steps 4 - 6 can be automated. See Automated
Rebuilding of Configuration Files below.
For submit.cf:
1. Change directories to the directory that contains the source files for the configuration files.
# cd /etc/mail/cf/cf
2. Create a copy of the submit file for your system.
# cp submit.mc submit-`hostname`.mc
3. Edit submit-`hostname`.mc. Make changes suitable for your system and environment.
4. Run make to generate the configuration file.
# /usr/bin/make submit-`hostname`.cf
5. Copy the newly generated file to its correct location.
# cp submit-`hostname`.cf /etc/mail/submit.cf
You do not need to restart sendmail for changes to submit.cf to take effect. Steps 4 and 5 can be automated. See Automated Rebuilding of
Configuration Files below.
Enabling Access to Remote Clients
The sendmail(1M) man page describes how the config/local_only property can be set to true or false to disallow or allow, respectively,
access to remote clients for unmodified systems.
Setting values for the following properties for the service instance svc:/network/smtp:sendmail results in automated (re)building of con-
figuration files:
path_to_sendmail_mc
path_to_submit_mc
The values for these properties should be strings which represent the path name of the .mc files referred to in steps 2 and 3 of both pro-
cedures above. Recommended values are:
/etc/mail/cf/cf/`hostname`.mc
/etc/mail/cf/cf/submit-`hostname`.mc
Each property, if set, results in the corresponding .mc file being used to (re)build the matching .cf file when the service is started.
These properties persist across upgrades and patches. To prevent a patch or upgrade from clobbering your .cf file, or renaming it to
.cf.old, you can set the desired properties instead.
FILES
/etc/mail/cf/README Describes sendmail configuration files.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWsndmr |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
SEE ALSO
make(1S), ps(1), sendmail(1M), svcadm(1M), attributes(5)
System Administration Guide: Network Services
SunOS 5.11 8 May 2008 sendmail(4)