10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Input.txt
123,ABC,XYZ1,A01,IND,I68,IND,NN
123,ABC,XYZ1,A01,IND,I67,IND,NN
998,SGR,St,R834,scot,R834,scot,NN
985,SGR0399,St,R180,T15,R180,T1,YY
985,SGR0399,St,R180,T15,R180,T1,NN
985,SGR0399,St,R180,T15,R180,T1,NN
2943,SGR?99,St,R68,Scot,R77,Scot,YY... (2 Replies)
Discussion started by: unme
2 Replies
2. Shell Programming and Scripting
Hi I have to run the script (a part of the code) in a loop for the no of times the files present in the directory, by taking one file and process and next another file.
For example, if we do ls and the result have:
$ls
abc.dat def.dat ghi.dat
The script code should loop for 3... (4 Replies)
Discussion started by: karumudi7
4 Replies
3. Shell Programming and Scripting
Hi guys,
I'm trying to learn grep and map and having a little problem.
Let's say I have a file which contains:
Apple: abcdcabdadddbac
I want to replace any combinations of three of abcd, thus when I do this:
print grep {s/{3}/X/g} <F>; # will do the subtitution fine, output XXXX
... (1 Reply)
Discussion started by: new bie
1 Replies
4. Shell Programming and Scripting
Hello everyone,
Can anyone give me a suggestion on lines below:
%hash = map {($_, -M "$dir/$_")} readdir D;
print map "$_\n", sort values %hash;
The thing is this will print the floating point numbers of files recently created/modified. I'd like to print out the file names only while... (0 Replies)
Discussion started by: new bie
0 Replies
5. Shell Programming and Scripting
I have a control file which tells me which are the fields in the files I need to compare and based on the values I need to print the exact value if key =Y and output is Y , or if output is Y/N then I need to print only Y if it matches or N if it does not match and if output =N , then skip the feild... (7 Replies)
Discussion started by: newtoawk
7 Replies
6. Shell Programming and Scripting
Hi,
I have below as i/p file:
5ABC 36488989 K 000010000ASB BYTRES
5PQR 45757754 K 000200005KPC HGTRET
5ABC 36488989 K 000045000ASB HGTRET
5GTH 36488989 K 000200200ASB BYTRES
5FTU ... (2 Replies)
Discussion started by: nirnkv
2 Replies
7. Shell Programming and Scripting
Hello ,
Please can someone tell me what exactly happens when the below filehandler is chomped into an array and later mapped.
$lcpLog="logcopy\@".getTimestamp."\log";
open CFg ,"< $lcpcfg";
chomp(@cfg = <CFG>);
close CFG;
@cfg=grep { $_ ne ' ' } map { lc + (split /\s*\/\//) }... (0 Replies)
Discussion started by: rmv
0 Replies
8. Shell Programming and Scripting
HI
The input 1st column has specific keys like 1 with value a,b and c. 2 with b,b,d and 3 with a,a a.
when ever c appears as one of the values the result will be key ........ c (You can see in the out put as 1 w...... 6.... c) and same follows for d.
Thanx:)
I'm learning awk scripting. If... (3 Replies)
Discussion started by: repinementer
3 Replies
9. UNIX for Dummies Questions & Answers
I need a script (perl or awk..anything is fine) to join 3 files based on three key columns. The no of non-key columns can vary in each file. The columns are delimited by semicolon.
For example,
File1
Dim1;Dim2;Dim3;Fact1;Fact2;Fact3;Fact4;Fact5
---- data delimited by semicolon ---
... (1 Reply)
Discussion started by: Sebben
1 Replies
10. Programming
how can i marge two files depend som key
for example:
the first file include many records of information for X person
and the second file have one record of information for each X person
shortly i want to mak first :match between the two files then insert data from the second to the first... (2 Replies)
Discussion started by: Ehab
2 Replies