10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a huge file which contains multiple lines. It need to check whether character length is not more than 255 each line. If its not then it should remove the
character up to column. I have described in the output below. If its more than that
the next line should start with call but if the... (1 Reply)
Discussion started by: JoshvaPeter
2. Shell Programming and Scripting
I need to append new data at the end of each line of the files. This new data is based on substring (3rd fields) of last column.
Input file xxx.csv:
U1234|1-5X|orange|1-5X|Act|1-5X|0.1 /sac/orange 12345 0
U5678|1-7X|grape|1-7X|Act|1-7X|0.1 /sac/grape 5678 0... (5 Replies)
Discussion started by: null7
3. Shell Programming and Scripting
I have a requirement where i need to split a file based on occurence of a character which is present at a fixed position. Description is as below:
1. The file will be more than 1 Lakh records.
2. Each line will be of fixed length of 987 characters.
3. At position 28 in each line either 'C' or... (9 Replies)
Discussion started by: Neelkanth
4. Shell Programming and Scripting
I am unable to find the right option to extract the data in the fixed width file.
hujk9876 io xgla
Search based on position 8-9="xg" and print the entire row
... (4 Replies)
Discussion started by: onesuri
5. Shell Programming and Scripting
I have a text file like below
in the above file i need to grep and print the lines if 14th to 18th... (4 Replies)
Discussion started by: aravindj80
6. Shell Programming and Scripting
I want to remove the trailing spaces at the end of each line starting from a particular position(using ksh script). For example, in the attached file, I want to remove all the spaces starting from the position 430 till the end. The space has to be removed only from the 430th position no matter in... (3 Replies)
Discussion started by: Suryaaravindh
7. Shell Programming and Scripting
I need to write a program to do something like a 'vlookup' in excel. I want to match data from file2 based on two fields (where both match) in file1, and for matching lines, add the data from two of the fields from file2 to file1.
If anyone knows something in perl or awk that can do this, I'd be... (20 Replies)
Discussion started by: jamessmith01
8. Shell Programming and Scripting
I have a .DAT file like below.
26666666660001343 000001004OLF 029100020090820
28888888880000780 000001013OLF 006500020090820
and so on.....
I want to append each line in a file in .KSH script with XXX with position... (5 Replies)
Discussion started by: kshuser
9. UNIX for Dummies Questions & Answers
I have a input file :::
The output file should have the record 16 appended to the record 15 and a variable should be added at a FIXED POSTION at 55.
The records are been processed inside a loop... (3 Replies)
Discussion started by: akashhello
10. Shell Programming and Scripting
i want to split a big line based on the position.
I have a single line which has 2300 characters.
i want to split from 1 character to 300th characters as first line
and 301th to 600 as second line and 601th to 900 as third line ...till the end of the string.
Can anyone help... (1 Reply)
Discussion started by: senthil_is