Sponsored Content
Full Discussion: Alternative for wc -l
Top Forums Shell Programming and Scripting Alternative for wc -l Post 302462832 by rajesh_2383 on Friday 15th of October 2010 06:54:43 AM
Old 10-15-2010
Data Alternative for wc -l

Hi techies ..

This is my first posting hr ..

Am facing a serious performance problem in counting the number of lines in the file. The input files i get will be in some 10 to 15 Gb of size or even sometimes more ..and I will load it to db

I have used wc -l to confirm whether the loader has loaded entire data ...the couting operaion alone consumes more than 45 to 50 mins ...could someone suggest me any other way to get the count of lines in files ..Smilie

pls note I cant use sed due to the coding standards followed here ..so pls excuse ..

Any other swifting workaround would be really helpfull ..and appreciatedSmilie
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

getopts alternative?

I have to implement switches (options) like this in my script. ./myscript -help ./myscript -dir /home/krish -all ./myscript -all getopts allows switches to have one character (like a, b, etc.). How can I customize it for handling the above situation? Or, is there any alternative to... (3 Replies)
Discussion started by: krishmaths
3 Replies

2. Shell Programming and Scripting

help with while loop or any other alternative?

i=1 while do mm=02 dd=03 yy=2008 echo "$mm$dd$yy" i=$(( i+1)) echo "$i" done whenever i execute the script above i will get the error below: syntax error at line 30: `i=$' unexpected (3 Replies)
Discussion started by: filthymonk
3 Replies

3. Shell Programming and Scripting

du alternative in perl

I have a perl script that just does a `du -sk -x` and formats it to look groovy ( the argument can be a directory but usually is like /usr/local/* ) #!/usr/bin/perl use strict; use warnings; my $sizes = `du -x -sk @ARGV | sort -n`; my $total = 0; print "MegaBytes Name\n"; for(split... (1 Reply)
Discussion started by: insania
1 Replies

4. HP-UX

alternative for egrep -o on HP-UX

Hello to all board members!! I have a problem on a HP-UX system. I should write a script. Therefore I need to search after IP addresses in the output of a command. On Debian this works: ifconfig | egrep -o "{1,3}\.{1,3}\.{1,3}\.{1,3}" The script where i need this is not ifconfig, but... (2 Replies)
Discussion started by: vostro
2 Replies

5. Shell Programming and Scripting

Alternative for ikecert

Hi Folks... Is there an alternative for ikecert(SunOS) - man info - "manipulates the machine's on-filesystem public-key certificate databases" in linux? Can we use pkcs7, pkcs8 or something like that?... I also came across ssh-keygen and ssh-keygen2... My best guess is to use ssh-certtool... (0 Replies)
Discussion started by: ahamed101
0 Replies

6. Solaris

Alternative to sshfs?

I have an automated testing script that relies on the dev box being able to see production's (NFS) share. It uses rsync and ssh to handle transfers and command execution; however, it also needs the production share mounted in order to run Perl code against it when Unix commands via ssh will not do.... (2 Replies)
Discussion started by: effigy
2 Replies

7. Solaris

vi alternative

Is there any other editor, installed by 'default' in Sparc Solaris10, besides vi? I'd like to avoid installing anything new. If not, how to make vi more user-friendly? thanks. (8 Replies)
Discussion started by: orange47
8 Replies

8. Shell Programming and Scripting

Looking for an alternative to Tcl

I've created quite a collection of tcl scripts which have buttons, radio buttons, check boxes, text fields, etc. These tcl scripts in turn call and execute several hundred sh, csh, bash, perl scripts and pass in the args based on the gui selections on the same and other redhat machines. We're... (4 Replies)
Discussion started by: scottwevans
4 Replies
LOADER.4TH(8)						    BSD System Manager's Manual 					     LOADER.4TH(8)

NAME
loader.4th -- loader.conf processing tools DESCRIPTION
The file that goes by the name of loader.4th is a set of commands designed to manipulate loader.conf(5) files. The default /boot/loader.rc includes loader.4th and uses one of its commands to automatically read and process the standard loader.conf(5) files. Other commands exists to help the user specify alternate configurations. The commands of loader.4th by themselves are not enough for most uses. Please refer to the examples below for the most common situations, and to loader(8) for additional commands. Before using any of the commands provided in loader.4th, it must be included through the command: include loader.4th This line is present in the default /boot/loader.rc file, so it is not needed (and should not be re-issued) in a normal setup. The commands provided by it are: boot boot kernelname [...] boot directory [...] boot -flag ... Boot as specified by the loader.conf(5) files read. Depending on the arguments passed, it can override boot flags and either the kernel name or the search path for kernel and modules. boot-conf boot-conf kernelname [...] boot-conf directory [...] boot-conf -flag ... Works like boot described above, but instead of booting immediately, uses autoboot, so it can be stopped. start Reads /boot/defaults/loader.conf, all other loader.conf(5) files specified in it, then loads the desired kernel and modules (if not already loaded). After which you can use the boot or autoboot commmands or simply exit (provided autoboot_delay is not set to NO) to boot the system. start is the command used in the default /boot/loader.rc file (see loader(8)). initialize Initialize the support library so commands can be used without executing start first. Like start, it reads /boot/defaults/loader.conf and all other loader.conf(5) files specified in it (but does not load kernel or modules). Returns a flag on the stack to indicate if any configuration files were successfully loaded. read-conf filename Reads and processes a loader.conf(5) file. Does not proceed to boot. enable-module module Enables the loading of module. disable-module module Disables the loading of module. toggle-module module Toggles the loading of module on and off. show-module module Shows the information gathered in the loader.conf(5) files about the module module. retry Used inside loader.conf(5) files to specify the action after a module loading fails. ignore Used inside loader.conf(5) files to specify the action after a module loading fails. try-include file [file ...] Process script files if they exist. Each file, in turn, is completely read into memory, and then each of its lines is passed to the command line interpreter. If any error is returned by the interpreter, the try-include command aborts immediately, without reading any other files, and silently returns without error. FILES
/boot/loader The loader(8). /boot/loader.4th loader.4th itself. /boot/loader.rc loader(8) bootstrapping script. /boot/defaults/loader.conf File loaded by the start command. EXAMPLES
Standard /boot/loader.rc: include /boot/loader.4th start Load a different kernel with the standard configuration: set kernel="kernel.old" unload boot-conf Read an additional configuration file and then proceed to boot: unload read-conf /boot/special.conf boot-conf Disable the loading of the splash screen module and bitmap and then proceed to boot: unload disable-module splash_bmp disable-module bitmap boot-conf SEE ALSO
loader.conf(5), loader(8) HISTORY
The loader.4th set of commands first appeared in FreeBSD 3.2. AUTHORS
The loader.4th set of commands was written by Daniel C. Sobral <dcs@FreeBSD.org>. BUGS
A British espionage series. BSD
November 13, 2013 BSD
All times are GMT -4. The time now is 08:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy