I need to do that simple string replacement at least a million times in one file and i have over 500 files to process. So i need to use awk...
I am not trying to advocate the use of sed as I think that awk is a better all-round tool but I think you underestimate sed when it comes to a simple string replacement.
I just did a little test on a string replacement in a big file (more than a million lines). Here are the results:
How do I alter this command so that it prints only the second comma delimited field from line number 3? Secondly, how do you redirect the output to a variable called TEST?
Thanks
(cat BATCH007.TXT | awk 'BEGIN { FS = "," } ; {print $2 }') (5 Replies)
Hi,
Whenever i am trying to telnet to server i am getting frequent error
Authorized Login: prtsrc's Password:
/dev/pts/171: Password read timed out -- possible noise on port
when i am rerunning the same it is working fine
thanks,
sam (2 Replies)
Hi Expert,
Below is a real production environment issue:
we are using shell script to FTP to a remote server and fetch around 150 files every day, for each file we need to keep a entry inside ORACLE DB table, before insert into table, each file has a associated logid, which need to be... (2 Replies)
Hi,
One of our web application is running in Linux and using apache web servers. Application is hosted in port 4080 (for soap requests) and port 9999, and its serving behind a vip and cname. Initially it was working fine in another server and recently (2 months back) we have moved to the new... (4 Replies)
Hi All,
There are few OpenBSD 4.8 servers without compiler installed at my working place. However, sometimes there are some patches released for patching the kernel.
My question is: Can I setup a non production OpenBSD 4.8 server as a test machine with compiler installed and use it to... (1 Reply)
Hello, system generated emails sent to users from production scripts within Aix arent going out. In the errpt -a output I see:
_______________________________________________________
LABEL: SRC_SVKO
IDENTIFIER: BC3BE5A3
Date/Time: Tue Mar 13 16:28:07 EDT 2012
Sequence... (2 Replies)
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
1)We have 2 node cluster RAC on AIX:
->test1
->test3
2) After rebooting server both the node sequentailly, we are getting below error from errpt command :
# errpt |more
IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
FE2DEE00 0901223914 P S SYSXAIXIF DUPLICATE IP ADDRESS... (2 Replies)
Hi Experts,,,
Need your help/advice on how to fix this
I have 2 users under same group (primary group) and i want to give 777 permissions on a directory to one dir owned by user1 when granted i can see than from getfacl but when i actually login as user2 i can touch a file .
... (3 Replies)
Discussion started by: maddyfreaks1
3 Replies
LEARN ABOUT REDHAT
autom4te
AUTOM4TE(1) User Commands AUTOM4TE(1)NAME
autom4te - Generate files and scripts thanks to M4
SYNOPSIS
autom4te [OPTION] ... [FILES]
DESCRIPTION
Run GNU M4 on the FILES, avoiding useless runs. Output the traces if tracing, the frozen file if freezing, otherwise the expansion of the
FILES.
If some of the FILES are named `FILE.m4f' they are considered to be M4 frozen files of all the previous files (which are therefore not
loaded). If `FILE.m4f' is not found, then `FILE.m4' will be used, together with all the previous files.
Some files may be optional, i.e., will only be processed if found in the include path, but then must end in `.m4?'; the question mark is
not part of the actual file name.
Operation modes:
-h, --help
print this help, then exit
-V, --version
print version number, then exit
-v, --verbose
verbosely report processing
-d, --debug
don't remove temporary files
-o, --output=FILE
save output in FILE (defaults to `-', stdout)
-f, --force
don't rely on cached values
-W, --warnings=CATEGORY
report the warnings falling in CATEGORY
-l, --language=LANG
specify the set of M4 macros to use
-C, --cache=DIRECTORY
preserve results for future runs in DIRECTORY
--no-cache
disable the cache
-m, --mode=OCTAL
change the non trace output file mode (0666)
-M, --melt
don't use M4 frozen files
Languages include:
`Autoconf'
create Autoconf configure scripts
`Autotest'
create Autotest test suites
`M4sh' create M4sh shell scripts
`M4sugar'
create M4sugar output
Warning categories include:
`cross'
cross compilation issues
`obsolete'
obsolete constructs
`syntax'
dubious syntactic constructs
`all' all the warnings
`no-CATEGORY'
turn off the warnings on CATEGORY
`none' turn off all the warnings
`error'
warnings are error
The environment variable `WARNINGS' is honored.
Library directories:
-B, --prepend-include=DIR
prepend directory DIR to search path
-I, --include=DIR
append directory DIR to search path
Tracing:
-t, --trace=MACRO
report the MACRO invocations
-p, --preselect=MACRO
prepare to trace MACRO in a future run
Freezing:
-F, --freeze
produce an M4 frozen state file for FILES
AUTHOR
Written by Akim Demaille.
Copyright 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
REPORTING BUGS
Report bugs to <bug-autoconf@gnu.org>.
SEE ALSO autoconf(1), automake(1), autoreconf(1), autoupdate(1), autoheader(1), autoscan(1), config.guess(1), config.sub(1), ifnames(1), libtool(1).
The full documentation for autom4te is maintained as a Texinfo manual. If the info and autom4te programs are properly installed at your
site, the command
info autom4te
should give you access to the complete manual.
autom4te 2.57 December 2002 AUTOM4TE(1)