Don,
Thank you very much.
I did some changes, and it's working fine for English char data. But, when I have international language data in the input file, getting into below error:
Appreciate your help regarding this.
Thanks
Hi,
I have a file that looks something like this:
...
0,6,256,87,0,0,0,1187443420
0,6,438,37,0,0,0,1187443380
0,2,0,0,0,10,0,1197140320
0,3,0,0,0,10,0,1197140875
0,2,0,0,0,23,0,1197140332
0,3,0,0,0,23,0,1197140437
0,2,0,0,0,17,0,1197140447
0,3,0,0,0,17,0,1197140543... (8 Replies)
I am writing a c++ program that has many calls of pow(input,2). I now realize that this is slowing down the program and these all should be input * input for greater speed.
There should be a simple way of doing this replacement throughout my file with awk, but I am not very familiar with awk.... (2 Replies)
Hi,
I have a file having around 30 records. Each record has 5 fields delimited by PIPE. Few records in the file having Junk characters in the field2 and field4.
I found the junk charcter and I tested it and replace the junk with space with the command below
perl -i -p -e "s/\x00/ /g"... (1 Reply)
Dear All,
I have file with 4 columns:
1 AA 0 21
2 BB 0 31
3 AA 0 21
4 CC 0 41
I would like to find the duplicate record based on column 2 and replace the 4th column of the duplicate by a new value. So, the output will be:
1 AA 0 21
2 BB 0 31
3 AA 0 -21
4 CC 0 41
Any suggestions... (3 Replies)
Hi,
I need to search for source path in file2 , as per file1 and if found get the next line and take the field value and put it in URL value of file1.
In file1, NF is not same for all the lines.
file1:
<type source="/home/USER/Desktop" Dest="/home/USER/DIR1/Desktop" URL="ssh/path"/>
<type... (8 Replies)
I have 2 files A.txt and B.txt
A.txt 3 fields and separate by a comma
some,thing,florida
any1,thing1,california
some2,thing2,dallas
just,fun,kansas
B.txt has 8 fields and separate by a comma
what,ever,florida-state,,,,,,
some,one,dallas_state,,,,,,
You will see 3rd fields are the... (5 Replies)
Hi
I would like to apply this gawk command:
gawk '{$0=gensub(/\y+\y/,"","g"); print}' file
not to the whole $0 but just to the part of $0 that is between:
(a number)"> and </mrk>
Is it possible?
thanks for your help. (4 Replies)
Hi there,
First of all this is my first post here. Thank you in advance for your help.
What I am trying to do is the following. I have a text file where each field of each row is separated by a tabulator.
Looks like this:
ATOM 1 N HSE A 26 3.033 -10.429 -2.262 1.00 17.07 ... (8 Replies)
Hello friends,
I have huge file with many sets where each "set" has few lines and each set always begins with "Set" in Sq brackets as shown above.
# cat file1 (2 Replies)
Hi All,
Seeking for your assistance on how to search and replace the last field/column. please see sample below:
inputfile1.csv
="8923523434",="543623534"="afd23535623",="100"="200"
="8923523431",="543623536"="afd23535626",="101"="201"... (3 Replies)
Discussion started by: poginiks
3 Replies
LEARN ABOUT ULTRIX
nl_fscanf
nl_scanf(3int)nl_scanf(3int)Name
nl_scanf, nl_fscanf, nl_sscanf - convert formatted input
Syntax
#include <stdio.h>
int nl_scanf ( format [, pointer ] ... )
char *format;
int nl_fscanf ( stream, format [, pointer ] ... )
FILE *stream;
char *format;
int nl_sscanf ( s, format [, pointer ] ... )
char *s, *format;
Description
The international functions and are identical to and have been superceded by the international functions and in libi. You should use the
and functions when you write new calls to convert formatted input in international programs. For more information on these functions, see
the reference page.
You can continue to use existing calls to the or functions. These functions remain available for compatibility with XPG-2 conformant soft-
ware, but may not be supported in future releases of the ULTRIX system.
The and international functions are similar to the standard I/O function. (For more information on the standard I/O function, see reference
page.) The difference is that the international functions allow you to use the %digit$ conversion character in place of the % character
you use in the standard I/O functions. The digit is a decimal digit n from 1 to 9. The international functions apply conversions to the n
th argument in the argument list, rather than to the next unused argument.
You can use the % conversion character in the international functions. However, you cannot mix the % conversion character with the %digit$
conversion character in a single call.
International Environment
LC_NUMERIC If this environment is set and valid, uses the international language database named in the definition to determine radix
character rules.
LANG If this environment variable is set and valid uses the international language database named in the definition to determine
collation and character classification rules. If is defined, its definition supersedes the definition of LANG.
Examples
The following shows an example of using the function:
nl_scanf("%2$s %1$d", integer, string)
If the input contains `` january 9 '', the function assigns 9 to integer and ``january'' to string .
Return Values
These functions return either the number of items matched or EOF on end of input, along with the number of missing or invalid data items.
See Alsointro(3int), setlocale(3), strtod(3), strtol(3), nl_printf(3int), printf(3int), scanf(3int), getc(3s), printf(3s), scanf(3s)
Guide to Developing International Software
nl_scanf(3int)