Sponsored Content
Full Discussion: Request for Recommendations
Top Forums UNIX for Advanced & Expert Users Request for Recommendations Post 302280553 by otheus on Tuesday 27th of January 2009 08:25:07 AM
Old 01-27-2009
Looks very nice. Here's a few tips:

Instead of having every line redirected to $logdir, you can just do this at the top of the script (instead of defining logdir):
Code:
exec - >"$processdir/GPMLogFile_$datetime.log" 2>&1

This will also redirect STDERR to the same file.

Instead of
Code:
         cp $uploaddir/GPM_*.csv $processdir
          if [ $? -eq 0 ] ; then

You can just do:
Code:
         if $uploaddir/GPM_*.csv $processdir
         then

Instead of
Code:
echo "Current Directory Path Is:" >> $logdir
echo "`pwd`" >> $logdir

You can do:
Code:
echo -n "Current Directory Path Is:" >> $logdir
pwd >>$logdir

(Note, you don't need to redirect if you followed my first tip).
Remove the -n if you want these lines to be separate in your output.
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Recommendations for a convert

I'm on my way, I've seen the light and it's not a train at the other end of the tunnel :) What tutorial or manual or reference point(s) would you recommend for an experienced DOS and CP/M type, who wants to learn the command equivalents within Unix? I have a good understanding of program... (2 Replies)
Discussion started by: Keith
2 Replies

2. Shell Programming and Scripting

your recommendations

Hi all, I'm trying to teach myself shell programming and scripting. What are good introduction level programming and/or scripting books that you recommend? I will gather your suggestions into a list and check out the IT-related sections of the nearest Barnes & Noble stores. Or if you could... (1 Reply)
Discussion started by: antalexi
1 Replies

3. UNIX for Dummies Questions & Answers

Looking for recommendations for free Xserver

Hello , im not sure if its the right forum... im sorry if not im working with putty allot , but now I started to work with more graphical applications and im looking for free simple and fast Xserver to remote connection, can someone recommend me if there is something like that ? (3 Replies)
Discussion started by: umen
3 Replies

4. UNIX for Advanced & Expert Users

SAP swap recommendations

Hello all. My company is installing an SAP ERP financials. The consultants are asking me to allocate 30Gbytes of swap. This is on a dedicated Linux box running Redhat 5 64Bit OS. It has 16GB of RAM.I have asked for an explanation but all I'm getting is that this is what SAP recommends. It seems... (2 Replies)
Discussion started by: jhtrice
2 Replies

5. Solaris

ZPOOL Reconfig Recommendations(?)

Current Setup: OS: Solaris 10 (5.10) x64 Motherboard: SUPERMICRO MBD-PDSME+-O LGA 775 Intel 3010 SATA Controller: SUPERMICRO AOC-SAT2-MV8 - SATA Controller (x2) Link Aggregated @ 2Gb: 110MB sustained throughput :b: NAME STATE READ WRITE CKSUM storagepool ONLINE ... (3 Replies)
Discussion started by: sol72
3 Replies

6. UNIX for Dummies Questions & Answers

Reinstall recommendations?

I'm currently running 32-bit Xubuntu 8.10 and I'm thinking of changing over to 64-bit Ubuntu 9.04. Any recommendations on how to make this go more smoothly? -----Post Update----- Can I shuffle around the partitions and install it as a second OS? Is there a good way to do that? (2 Replies)
Discussion started by: CRGreathouse
2 Replies

7. Fedora

Recommendations on Unix Distro

I'd like to become more familiar with Unix. To that end I want to install and practice/play with a (open source) Unix distro; however, I'm uncertain which one I should use. I'm considering freebsd, openbsd, and openSolaris. I'm familiar and comfortable with RHL/CentOS and Debian/Ubuntu. Keeping... (3 Replies)
Discussion started by: NateKin
3 Replies
inityp2l(1M)						  System Administration Commands					      inityp2l(1M)

NAME
inityp2l - create NIS (YP) to LDAP configuration files SYNOPSIS
/usr/lib/netsvc/yp/inityp2l [-m mapping_file_name] [-c config_file_name] DESCRIPTION
The inityp2l utility assists with creation of the NISLDAPmapping and ypserv files. See NISLDAPmapping(4) andypserv(4). inityp2l examines the NIS maps on a system. and through a dialogue with the user, determines which NIS to (and from) LDAP mappings are required. A NISLDAPmapping file is then created based on this information. The utility asks users about their LDAP server configuration and a ypserv file is created based on this information. The inityp2l utility handles mappings for standard NIS maps and the auto.* series of maps. If requested, it creates default mappings for custom maps, with each map entry represented as a single DIT string. inityp2l does not handle full custom mapping, but if requested, ini- typ2l will insert comments into the NISLDAPmapping file that indicate where these should be added. To write to the NISLDAPmapping or ypserv files is potentially dangerous. inityp2l warns the user and asks for confirmation before: 1. it overwrites either file 2. it writes to the default NISLDAPmapping file location, if this file did not previously exist. This is important because the existence of a file in this location causes NIS components to work NIS to LDAP (N2L) mode when next restarted, rather than to traditional NIS mode. inityp2l assists with rapid creation of a simple N2L configuration files. It is not a general purpose tool for the management of these files. An advanced user who would like to maintain the files or use custom mappings should examine the output of inityp2l and customize it by using a standard text editor. OPTIONS
inityp2l supports the following options: -c Specify the name of the generated ypserv file. The default location is described in FILES. -m Specify the name of the generated NISLDAPmapping file. The default is described in FILES. FILES
/var/yp The directory to be searched for candidate domains (/var/yp/*) and NIS maps (/var/yp/*/*) /var/yp/NISLDAPmapping The default location for the generated NISLDAPmapping file /etc/default/ypserv The default location for the generated ypserv file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWypu | +-----------------------------+-----------------------------+ |Interface Stability |Obsolete | +-----------------------------+-----------------------------+ SEE ALSO
NISLDAPmapping(4), ypserv(4), attributes(5) SunOS 5.10 10 Apr 2003 inityp2l(1M)
All times are GMT -4. The time now is 11:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy