Commit dc6deae1 authored by sruizcarmona's avatar sruizcarmona

fixed sdmodify to print out help message

parent 650f84ed
......@@ -13,7 +13,7 @@ use SDRecord;
my $SDMODKEY = "ID";
#Print help if no command line arguments
#printHelpAndExit() if (scalar(@ARGV) == 0);
printHelpAndExit() if (scalar(@ARGV) == 0);
#Parse command line arguments
my @files;
......@@ -41,3 +41,19 @@ while ($sdRec->readRec('DATA'=>1,'LINES'=>1)) {
}
$sdRec->writeRec();
}
#!/usr/bin/perl
# Script to set the first title line equal to a given data field
#
# Usage: sdmodify -f<DataField> [sdFiles]
#
# If sdFiles not given, reads from standard input
# Output is to standard output
sub printHelpAndExit {
print "\nScript to set the first title line equal to a given data field.\n";
print "\nUsage:\tsdmodify -f<DataField> [sdFiles]\n";
print "\n\tIf sdFiles not given, reads from standard input.\n";
print "\n\tOutput is to standard output.\n\n";
exit;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment