Sponsored Content
Full Discussion: Help speeding up script
Top Forums Shell Programming and Scripting Help speeding up script Post 302942405 by JohnN6 on Tuesday 28th of April 2015 01:21:44 PM
Old 04-28-2015
The original script did result in 3 coming before 4. Having it the other way is preferable, but I figured at the time that it was something I could live with.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

speeding up the compilation on SUN Solaris environment

Dear friends, Please let me know how do I increase the speed of my compilation in SUN Solaris environment. actually I have many subfolders which contains .cc files. when I compile makefile at the root it will take much time to compile all the subfolders and generates object(.o) files. Can... (2 Replies)
Discussion started by: swamymns
2 Replies

2. Shell Programming and Scripting

Speeding up processing a file

Hi guys, I'm hoping you can help me here. I've knocked up a script that looks at a (huge) log file, and pulls from each line the hour of each transaction and how long each transaction took. The data is stored sequentially as: 07:01 blah blah blah 12456 blah 07:03 blah blah blah 234 blah... (4 Replies)
Discussion started by: dlam
4 Replies

3. UNIX for Dummies Questions & Answers

Speeding up a Shell Script (find, grep and a for loop)

Hi all, I'm having some trouble with a shell script that I have put together to search our web pages for links to PDFs. The first thing I did was: ls -R | grep .pdf > /tmp/dave_pdfs.outWhich generates a list of all of the PDFs on the server. For the sake of arguement, say it looks like... (8 Replies)
Discussion started by: Dave Stockdale
8 Replies

4. UNIX for Dummies Questions & Answers

Speeding/Optimizing GREP search on CSV files

Hi all, I have problem with searching hundreds of CSV files, the problem is that search is lasting too long (over 5min). Csv files are "," delimited, and have 30 fields each line, but I always grep same 4 fields - so is there a way to grep just those 4 fields to speed-up search. Example:... (11 Replies)
Discussion started by: Whit3H0rse
11 Replies

5. Shell Programming and Scripting

speeding up bash script with "while read line"

Hello everybody, I'm still slowly treading my way into bash scripting (without any prior programming experience) and hence my code is mostly what some might call "creative" if they meant well :D I have created a script that serves its purpose but it does so very slowly, since it needs to work... (4 Replies)
Discussion started by: origamisven
4 Replies

6. Shell Programming and Scripting

Speeding up search and replace in a for loop

Hello, I am using sed in a for loop to replace text in a 100MB file. I have about 55,000 entries to convert in a csv file with two entries per line. The following script works to search file.txt for the first field from conversion.csv and then replace it with the second field. While it works fine,... (15 Replies)
Discussion started by: pbluescript
15 Replies

7. Shell Programming and Scripting

Speeding up substitutions

Hi all, I have a lookup table from which I am looking up values (from col1) and replacing them by corresponding values (from col2) in another file. lookup file a,b c,d So just replace a by b, and replace c by d. mainfile a,fvvgeggsegg,dvs a,fgeggefddddddddddg... (7 Replies)
Discussion started by: senhia83
7 Replies

8. Shell Programming and Scripting

Speeding up shell script with grep

HI Guys hoping some one can help I have two files on both containing uk phone numbers master is a file which has been collated over a few years ad currently contains around 4 million numbers new is a file which also contains 4 million number i need to split new nto two separate files... (4 Replies)
Discussion started by: dunryc
4 Replies

9. Shell Programming and Scripting

Help 'speeding' up this 'parsing' script - taking 24+ hours to run

Hi, I've written a ksh script that read a file and parse/filter/format each line. The script runs as expected but it runs for 24+ hours for a file that has 2million lines. And sometimes, the input file has 10million lines which means it can be running for more than 2 days and still not finish.... (9 Replies)
Discussion started by: newbie_01
9 Replies

10. Shell Programming and Scripting

Help with speeding up my working script to take less time - how to use more CPU usage for a script

Hello experts, we have input files with 700K lines each (one generated for every hour). and we need to convert them as below and move them to another directory once. Sample INPUT:- # cat test1 1559205600000,8474,NormalizedPortInfo,PctDiscards,0.0,Interface,BG-CTA-AX1.test.com,Vl111... (7 Replies)
Discussion started by: prvnrk
7 Replies
nisdefaults(1)                                                     User Commands                                                    nisdefaults(1)

NAME
nisdefaults - display NIS+ default values SYNOPSIS
nisdefaults [-adghprstv] DESCRIPTION
The nisdefaults utility prints the default values that are returned by calls to the NIS+ local name functions (see nis_local_names(3NSL)). With no options specified, all defaults will be printed in a verbose format. With options, only that option is displayed in a terse form suitable for shell scripts. See the example below. OPTIONS
The following options are supported: -a Print all defaults in a terse format. -d Print the default domain name. -g Print the default group name. -h Print the default host name. -p Print the default principal name. -r Print the default access rights with which new objects will be created. -s Print the default directory search path. -t Print the default time to live value. -v Print the defaults in a verbose format. This prepends an identifying string to the output. EXAMPLES
Example 1: Printing NIS+ defaults The following prints the NIS+ defaults for a root process on machine example in the foo.bar. domain: example# nisdefaults Principal Name : example.foo.bar. Domain Name : foo.bar. Host Name : example.foo.bar. Group Name : Access Rights : ----rmcdr---r--- Time to live : 12:00:00 Search Path : foo.bar. Example 2: Setting a variable in the shell script This example sets a variable in a shell script to the default domain: DOMAIN=`nisdefaults -d` Example 3: Printing the default time to live in verbose format This example prints out the default time to live in a verbose format: example% nisdefaults -tv Time to live : 12:00:00 Example 4: Printing the time to live in terse format This example prints out the time to live in the terse format: example% nisdefaults -t 43200 ENVIRONMENT VARIABLES
Several environment variables affect the defaults associated with a process. NIS_DEFAULTS This variable contains a defaults string that will override the NIS+ standard defaults. The defaults string is a series of tokens separated by colons. These tokens represent the default values to be used for the generic object properties. All of the legal tokens are described below. ttl=time This token sets the default time to live for objects that are created. The value time is specified in the for- mat as defined by the nischttl(1) command. The default value is 12 hours. owner=ownername This token specifies that the NIS+ principal ownername should own created objects. The default for this value is the principal who is executing the command. group=groupname This token specifies that the group groupname should be the group owner for created objects. The default is NULL. access=rights This token specifies the set of access rights that are to be granted for created objects. The value rights is specified in the format as defined by the nischmod(1) command. The default value is: ----rmcdr---r---. NIS_GROUP This variable contains the name of the local NIS+ group. If the name is not fully qualified, the default domain will be appended to it. NIS_PATH This variable overrides the default NIS+ directory search path. It contains an ordered list of directories sepa- rated by ':' (colon) characters. The '$' (dollar sign) character is treated specially. Directory names that end in '$' have the default domain appended to them, and a '$' by itself is replaced by the list of directories between the default domain and the global root that are at least two levels deep. The default NIS+ directory search path is '$'. Refer to the Name Expansion subsection in nis+(1) for more details. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWnisu | +-----------------------------+-----------------------------+ SEE ALSO
nischmod(1), nischttl(1), nis+(1), nis_local_names(3NSL), attributes(5) NOTES
NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html. SunOS 5.10 10 Dec 2001 nisdefaults(1)
All times are GMT -4. The time now is 11:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy