8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a issue, I need to loop through a comma delimited file and check for the length which exceeds specified length , if Yes truncate the string.
But my problem is , I do not have to check for all the fields and the field lenght is not same for all the fields.
For ex:
Say my line... (9 Replies)
Discussion started by: rashmisb
9 Replies
2. Shell Programming and Scripting
Hi Everyone,
# cat a.txt
a;b;c;64O
a;b;c;d;ee;f
# cat a.pl
#!/usr/bin/perl
use strict;
use warnings;
my $tmp3 = ",,a,,b,,c,,d,,e,,f,,";
open(my $FA, "a.txt") or die "$!";
while(<$FA>) {
chomp;
my @tmp=split(/\;/, $_);
if ( ($tmp =~ m/^(64O)/i) || ($tmp... (3 Replies)
Discussion started by: jimmy_y
3 Replies
3. Shell Programming and Scripting
Hi,
I have a problem, please help me,
I have a flat file like this:
P00000000088888888999999999 0000999903 000000000000000000
P00000000077777777000000000 0000999903 000000000000000000
P00000000044444444333333333 0000999903 00000000000000000079875
P00000000066666666111111111 0000999903 ... (5 Replies)
Discussion started by: DebianJ
5 Replies
4. Shell Programming and Scripting
I've got a file that would have lines similar to:
12345678 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
23456781 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
34567812 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
45678123 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 xx.00... (10 Replies)
Discussion started by: Cailet
10 Replies
5. Shell Programming and Scripting
When I try to sort a file where some records contain nulls i.e. hex 00 the sort truncates the record when it reaches the null and writes message:
"sort: warning: missing NEWLINE added at end of input file myfile"
I'm assuming from this that the sort sees the null as a special character and... (6 Replies)
Discussion started by: ArthurWaik
6 Replies
6. Shell Programming and Scripting
Hi All,
I have a table with 10 columns. Some columns(2nd,4th,5th,7th,8th and 10th) are Not Null columns. I'll get a tab-delimited file and want to check col by col and generate seperate error code for each col eg:102 if 2nd col value is NULL and 104 if 4th col value is NULL so on... I am a... (7 Replies)
Discussion started by: Mandab
7 Replies
7. AIX
I'm not familiar with unix.
I need know how to check parameter (length) when i need check the userid. lets say my charaters is 3, how to check I must key-in 3 word before system can continue to another step
echo "\n\n\n\tPlease Enter User ID: \c"
read userid
if
then
echo... (1 Reply)
Discussion started by: wanasmadi
1 Replies
8. Shell Programming and Scripting
I am using a Korn Shell script..
I need to verify the length of a variable..
ie number=12345
I need then to check 12345 to make sure its no longer than 5 digits...
Can you help? (4 Replies)
Discussion started by: frustrated1
4 Replies