Calculate the length of the each variable and matches to the desired value
My script is currently doing two function and I want to add one more as pre the question.
This is the complete string which I am using in the script to get the desired results
D0000,D12345,S1234,D12345 | KestrelPrdV2_0.build.177 - svn 141115 tag as V2.0.0.14
Now my script will cut the left part (left from | symbol)
D0000,D12345,S1234,D12345
Now my question is how to calculate the length of the each varibale and also it should not more than 6 i.e. -le 6.Number of variables can be increases or decreases upto infinity.
Code is perfect but the conditon was that there should be space left and right of the pipe symbol...and one more thing that is if length is above 7 it should be exited.
Hi Team,
I have an issue to split the file which is having special chracter(German Char) using awk command.
I have a different length records in a file. I am separating the files based on the length using awk command.
The command is working fine if the record is not having any... (7 Replies)
Hi,
Can anyone help with a effective solution ?
I need to change a variable length text field (between 1 - 18 characters) to a fixed length text of 18 characters with the unused portion, at the end, filled with spaces.
The text field is actually field 10 of a .csv file however I could cut... (7 Replies)
Very, very new to unix scripting and have a unique situation. I have a file of records that contain 3 records types:
(H)eader Records
(D)etail Records
(T)railer Records
The Detail records are 82 bytes in length which is perfect. The Header and Trailer records sometimes are 82 bytes in... (3 Replies)
For example, if I have the file whose content are:
>HWI-EAS382_30FC7AAXX:7:1:927:1368
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>HWI-EAS382_30FC7AAXX:7:1:924:1373
ACGAACTTTAAAGCACCTCTTGGCTCGTATGCCGTC
I want my output calculate the total length of nucleotide. So my output should look like this:... (1 Reply)
Hi all,
I have file having 4 coulmn like
9246309198,406655682,400009246309198
9246309198,9246309198,400009246309198
9246309198,9246309198,400009246309198
9246309198,9246309198,400009246309198
9246309198,406655682,400009246309198
9246309198,9246309198,400009246309198
I want to valid... (4 Replies)
Is there a command that sets a variable length?
I have a input of a variable length field but my output for that field needs to be set to 32 char.
Is there such a command?
I am on a sun box running ksh
Thanks (2 Replies)