I have a file where some records have been updated the wrong way and need to fix it quickly since the amount can be alot.
Every record where any of the first 4 characters are in upper case need to be changed to lowercase.
Records can have '#' in position-1 for comments. These musn't be... (2 Replies)
I have a file tmp.out with contents:
2008-08-09 05:11:01
2008-08-09 08:52:59
2008-08-11 12:08:34
2008-08-11 12:15:40
I want the output to be:
3|0|1|71|2008-08-09 05:11:01|2008-08-30 11:19:28
4|0|1|71|2008-08-09 08:52:59|2008-08-30 11:19:28
5|0|1|71|2008-08-11 12:08:34|2008-08-30 11:19:28... (6 Replies)
Hi Guys,
I have a small problem with awk.
I want to search { and } at a particular position in a string using awk.
I tried
echo "hello{hi" | awk '{if(substr($0,6,1)=="{"){print "TRUE"}}'
but no success :mad:
i know it can be done in many ways and i know them also.. but my... (6 Replies)
How can I change a string contained in a variable to upper case using csh ???
---------- Post updated at 08:39 AM ---------- Previous update was at 08:29 AM ----------
I think I've got it, using tr has solved the problem
set opt = ` echo $opt | tr "" "" ` (1 Reply)
As this function returns the address of the string corressponding to the errno value provided to it. Can someone please let me know where, in the memory, it could be (on freeBSD).
The MAN page tells under the BUG section that "For unknown error numbers, the strerror() function will return its... (5 Replies)
Hi...all
I want to pass array name for some function using loop anyone is having idea ?
here is scenario
echo | awk '
BEGIN{
A1="foo1"
A2="foo2"
A3="foo3"
}
function test1(a,b,c){
print a,b,c
... (10 Replies)
I have a file that has a pattern 2 lines, blanktwo line
If encountering the first line, the 2nd line need to be converted to UPPERCASE...or...conver the 2nd line after ablank into uppercase
Is there a 'tr' function in awk..(probably the best tool over sed) ?
i.e.
......................... (6 Replies)
Hello is it possible with awk or sed to replace any white space with the previous line characters in the same position?
I am asking this because the file I have doesn't always follow a pattern.
For example the file I have is the result of a command to obtain windows ACLs:
icacls C:\ /t... (5 Replies)
TOUPPER(3) BSD Library Functions Manual TOUPPER(3)NAME
toupper, toupper_l -- lower case to upper case letter conversion
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <ctype.h>
int
toupper(int c);
#include <ctype.h>
#include <xlocale.h>
int
toupper_l(int c, locale_t loc);
DESCRIPTION
The toupper() function converts a lower-case letter to the corresponding upper-case letter. The argument must be representable as an
unsigned char or the value of EOF.
Although the toupper() function uses the current locale, the toupper_l() function may be passed a locale directly. See xlocale(3) for more
information.
RETURN VALUES
If the argument is a lower-case letter, the toupper() function returns the corresponding upper-case letter if there is one; otherwise, the
argument is returned unchanged.
COMPATIBILITY
The 4.4BSD extension of accepting arguments outside of the range of the unsigned char type in locales with large character sets is considered
obsolete and may not be supported in future releases. The towupper() function should be used instead.
SEE ALSO ctype(3), isupper(3), towupper(3), xlocale(3)STANDARDS
The toupper() function conforms to ISO/IEC 9899:1990 (``ISO C90'').
BSD July 17, 2005 BSD