10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Identify the First Column Position in Second Column and add the position value in 3rd column.
Sample data:
a|c
b|d
c|a
d|b
e|e
f|g
g|f
|h
|i
Expected Output:
a|c|1
b|d|2
c|a|3
d|b|4 (6 Replies)
Discussion started by: BrahmaNaiduA
6 Replies
2. Shell Programming and Scripting
I am trying to add 0393 value at 24th feild using the below command, but its adding at all the lines including header and trailer
Input file:
ZHV|2657|D0217001|T|TXU|Z|PAN|20131112000552||||OPER|
754|52479|
492|489|SP40|1014570286334|20131111|20131201|14355334|CHAMELON... (1 Reply)
Discussion started by: Aditya_001
1 Replies
3. UNIX for Dummies Questions & Answers
I have a csv flatfile with a few million rows. I need to replace a field (field number is 85) in the file with a sequential number.
As an example, let's assume there are only 4 fields in the file:
A,A,,32
A,A,,27
A,B,,43
C,C,,354
If I wanted to amend the 3rd field in this way my... (2 Replies)
Discussion started by: BristolSmithy
2 Replies
4. Shell Programming and Scripting
Hi all,
I did not use UNIX for a long time, now i need to make a flat file with extra field, can you help me with the code ?
1. I create a last line of each log from each system and make it in a flat text file (seperate by a pipe |)
mv current.log old
tail -1 sanfrancisco.log > current.log... (5 Replies)
Discussion started by: britney
5 Replies
5. Shell Programming and Scripting
Hey Everyone!
I have searched around for this on Unix.com and Google, and I'm either not phrasing my search properly or this is not as simple as I thought...
I have a script that runs on a nightly basis that pulls one field worth of data from an internal MySQL database and populates to an... (2 Replies)
Discussion started by: Gecko12332
2 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I have a file like this,
0.0.0.1 /account 327706,Data Cleansing,,,CRM error,100,0
The above line is a comma separted data file. I want to modify the third field
to
The final data file should be like
0.0.0.1 /account 327706,Data Cleansing,,,CRM error,100,0
... (1 Reply)
Discussion started by: girish.raos
1 Replies
7. Shell Programming and Scripting
Please help
Need a script which will do the following :
Search on fixed width file , go to position (25,2) which means 25th and 26th position, Find if there are any char in lower case:
For example 25,2 can be (9T) or (9w) or (Ww) or (wW)....The two positions can be numeric or alpha...no... (13 Replies)
Discussion started by: ssantoshss
13 Replies
8. Shell Programming and Scripting
Hi All,
I have a flat file with ~ as de-limiter (e.g: aaa~ba a~caa~0~d~e)
What I want is check if the 4th character is 0 and replace it with say 4. So now it becomes : aaa~ba a~caa~4~d~e.
I have to do this for the whole file, but the delimiter position remains the same, not the... (10 Replies)
Discussion started by: akdwivedi
10 Replies
9. Shell Programming and Scripting
Here is on more go ! Need a shortcut for my problem !
problem is i have a look_update with fixed sequence of column
that is :
MANDT:SERAIL:SERSCHA:SEREX:EQTYP:BSTVP
I will be getting data in a flat file having same number of column but the sequence could be different in each... (5 Replies)
Discussion started by: jambesh
5 Replies
10. Shell Programming and Scripting
Hi,
I have an urgent task here. I am required to sort a flat file based on multiple columns which are based on the character position in that line. I am restricted to use the character position instead of the space and sort +1 +2 etc to do the sorting.
I understand that there is a previous... (8 Replies)
Discussion started by: cucubird
8 Replies