our user creates a text file with a white space on the filename. this same file is transfered to unix via automation tool. i have a korn shell script that reads these files on a input directory and connects to oracle database to run the oracle procedures which will load the data from each of the files. it appears to be that my code does not recognize a file that has a white space on it's filename. i am using a simple for loop with a combination of ls -1 *.* commands on my code. i think i might be missing something.
below is the sample of snippet of the code that i use to simulate the result.
when the above code is run below is the results.
please help. thank you.
Hi All;
Having a problem with a file..
the file contains the following data... (a snapshot)
1331F9E9DB7C2BB80EAEDE3A8F043B94,AL7 1DZ,M,50
186FDF93E1303DBA217279EC3671EA91,NG5 1JU,M,24
3783FFAF602015056A8CD21104B1AAAF,CH42 4NQ,M,17
It has 3 columns sepreated by a ,
the second column... (7 Replies)
Dear Users,
How do we pad with white space of particular length between two variables.
For Example:
Suppose i define the variables as follows:
a='toyota'
b='camry'
c='honda'
d='accord'
e=`echo "$a"'\n'"$b"`
f=`echo "$c"'\n'"$d"`
If i do an echo on variables e and f i get :... (1 Reply)
Dear Members,
Suppose i have a variable test which stores a string as below:
test='John drives+++++++++a+++++car'
now i want to use sed on the above variable and replace + with a white space, so that i get
echo $test should give me
'john drives a car'
Between... (1 Reply)
Hi,
What sed command (if sed is the right command) can remove ALL white space from my file. I have a csv, except I want to remove all white space between commas and characters.
My idea (without testing)
sed 's/ //g'
Is there a better way? (18 Replies)
Hi ,
I have a file with contents as below
group1 = aaaaa, bbbbb, ccccc, aaa
group2=aaa, bbbbb, ccccc, aaaaa
group3 = bbbbb, aaa, ccccc, aaaaa
group4 = bbbbb, aaa,ccccc, aaaaa
I want to search for "aaa" and the output should be as below
group1 = aaaaa, bbbbb, ccccc
group2= bbbbb, ccccc,... (3 Replies)
Hi;
In following code
find LOG_DIR -type f | while read filename; do echo $filename; done
I want to precede each white space encountered in filename with \ so that when i use $filename for running some commands in do...done,it wont give me an error.
will appreciate ur help in this.... (1 Reply)
I have an AWK script that uses multiple delimiters in the FS variable.
FS="+"
My awk script takes a file name such as this:
12345_smith_bubba_12345_20120215_4_0.pdf and parses it out based on the under score. Each parsed field then has some code for data validation etc.
This script has... (12 Replies)
Hi,
I have a very big file 25GB with information present in it like
$ head ind_stats
update index statistics pfirm001.dbo.Office using 200 values
go
... (11 Replies)
Hi
How to remove white space from this input:|blue | 1|
|green| 4|
|black| 2|
I like to search for green and get 4not 4
How to modify this to work correct:awk -F"|" '/green/ {print $3} (7 Replies)
hi guys
how can i add spacein file name with sed if strings have no space around dash
input
19-20
( 18-19 )
ABC-EFG
output after add white space
19 - 20
(18 - 19 )
ABC - EFG
thx in advance (2 Replies)
Discussion started by: mhs
2 Replies
LEARN ABOUT DEBIAN
test::synopsis
Test::Synopsis(3pm) User Contributed Perl Documentation Test::Synopsis(3pm)NAME
Test::Synopsis - Test your SYNOPSIS code
SYNOPSIS
# xt/synopsis.t (with Module::Install::AuthorTests)
use Test::Synopsis;
all_synopsis_ok();
# Or, run safe without Test::Synopsis
use Test::More;
eval "use Test::Synopsis";
plan skip_all => "Test::Synopsis required for testing" if $@;
all_synopsis_ok();
DESCRIPTION
Test::Synopsis is an (author) test module to find .pm or .pod files under your lib directory and then make sure the example snippet code in
your SYNOPSIS section passes the perl compile check.
Note that this module only checks the perl syntax (by wrapping the code with "sub") and doesn't actually run the code.
Suppose you have the following POD in your module.
=head1 NAME
Awesome::Template - My awesome template
=head1 SYNOPSIS
use Awesome::Template;
my $template = Awesome::Template->new;
$tempalte->render("template.at");
=head1 DESCRIPTION
An user of your module would try copy-paste this synopsis code and find that this code doesn't compile because there's a typo in your
variable name $tempalte. Test::Synopsis will catch that error before you ship it.
VARIABLE DECLARATIONS
Sometimes you might want to put some undeclared variables in your synopsis, like:
=head1 SYNOPSIS
use Data::Dumper::Names;
print Dumper($scalar, @array, \%hash);
This assumes these variables like $scalar are defined elsewhere in module user's code, but Test::Synopsis, by default, will complain that
these variables are not declared:
Global symbol "$scalar" requires explicit package name at ...
In this case, you can add the following POD sequence elsewhere in your POD:
=for test_synopsis
no strict 'vars'
Or more explicitly,
=for test_synopsis
my($scalar, @array, %hash);
Test::Synopsis will find these "=for" blocks and these statements are prepended before your SYNOPSIS code when being evaluated, so those
variable name errors will go away, without adding unnecessary bits in SYNOPSIS which might confuse users.
AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
Goro Fuji blogged about the original idea at <http://d.hatena.ne.jp/gfx/20090224/1235449381> based on the testing code taken from
Test::Weaken.
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Test::Pod, Test::UseAllModules, Test::Inline, Test::Snippet
perl v5.10.1 2009-07-06 Test::Synopsis(3pm)