11-17-2006
remove hidden messages
When I print (cat) my log file, the following shows up
[00:15:09 17/11/2006] Executing sftp ...
sftp> lcd /home/abc
/home/abc
sftp> put test.xml
test.xml | 20MB | 620kB/s | TOC: 00:00:33 | 100%
sftp> quit
[00:15:46 17/11/2006] test.xml transferred
then I try to grep "100%" from this file where I got "grep: 0652-226 Maximum line length of 2048 exceeded."
So I did a "cat -v" on my log file which give me
[00:15:09 17/11/2006] Executing sftp ...
sftp> lcd /home/abc^M
/home/abc^M
sftp> put test.xml^M
^Mtest.xml | 576kB | 576kB/s | ETA: 00:00:34 | 2%^Mtest.xml | 960kB | 480kB/s | ETA: 00:00:40 | 4%^Mtest.xml | 1.4MB | 480kB/s | ETA: 00:00:39 | 7%^Mtest.xml | 1.9MB | 480kB/s | ETA: 00:00:38 | 9%^Mtest.xml | 2.4MB | 486kB/s | ETA: 00:00:37 | 11%^Mtest.xml | 2.8MB | 485kB/s | ETA: 00:00:36 | 14%^Mtest.xml | 3.3MB | 485kB/s | ETA: 00:00:35 | 16%^Mtest.xml | 3.8MB | 480kB/s | ETA: 00:00:34 | 18%^Mtest.xml | 4.2MB | 480kB/s | ETA: 00:00:33 | 21%^Mtest.xml | 4.7MB | 480kB/s | ETA: 00:00:32 | 23%^Mtest.xml | 5.1MB | 477kB/s | ETA: 00:00:31 | 25%^Mtest.xml | 5.6MB | 480kB/s | ETA: 00:00:30 | 28%^Mtest.xml | 6.1MB | 480kB/s | ETA: 00:00:29 | 30%^Mtest.xml | 6.5MB | 475kB/s | ETA: 00:00:29 | 32%^Mtest.xml | 6.9MB | 469kB/s | ETA: 00:00:28 | 34%^Mtest.xml | 7.3MB | 470kB/s | ETA: 00:00:27 | 36%^Mtest.xml | 7.8MB | 471kB/s | ETA: 00:00:26 | 39%^Mtest.xml | 8.3MB | 471kB/s | ETA: 00:00:25 | 41%^Mtest.xml | 8.9MB | 478kB/s | ETA: 00:00:23 | 44%^Mtest.xml | 9.4MB | 482kB/s | ETA: 00:00:22 | 47%^Mtest.xml | 10MB | 486kB/s | ETA: 00:00:21 | 49%^Mtest.xml | 11MB | 492kB/s | ETA: 00:00:19 | 52%^Mtest.xml | 11MB | 498kB/s | ETA: 00:00:18 | 56%^Mtest.xml | 12MB | 509kB/s | ETA: 00:00:16 | 59%^Mtest.xml | 13MB | 521kB/s | ETA: 00:00:14 | 63%^Mtest.xml | 14MB | 537kB/s | ETA: 00:00:12 | 68%^Mtest.xml | 14MB | 548kB/s | ETA: 00:00:10 | 72%^Mtest.xml | 15MB | 561kB/s | ETA: 00:00:08 | 76%^Mtest.xml | 16MB | 570kB/s | ETA: 00:00:06 | 80%^Mtest.xml | 17MB | 578kB/s | ETA: 00:00:05 | 84%^Mtest.xml | 18MB | 588kB/s | ETA: 00:00:03 | 89%^Mtest.xml | 19MB | 597kB/s | ETA: 00:00:02 | 93%^Mtest.xml | 19MB | 603kB/s | ETA: 00:00:00 | 97%^Mtest.xml | 20MB | 620kB/s | TOC: 00:00:33 | 100%^M
sftp> quit^M
[00:15:46 17/11/2006] test.xml transferred
what I want to do is to verify whether the file is transferred successfully, hence "grep 100%", but it seems that there are many hidden messages which cause error, can anyone tell me whether I can remove these hidden messages? or is there any other way to verify?
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi. I have a script which is deleting files with a particular extension and older than 45 days.The code is:
find <path> -name "<filename_pattern>" -mtime +45 -exec rm {} \;
But the problem is that some important files are also getting deleted.To prevent this I have decide to make a dummy... (4 Replies)
Discussion started by: pochaw
4 Replies
2. Shell Programming and Scripting
Hi I have a file in which there are lot of redundancy messages..
Like suppose i have the messages like the following in my file..
45123|1|784tryr|uirirr|wagras|swyuyau||
45123|1|784tryr|uirirr|wagras|swyuyau||
I need to remove the extra (45123|1|784tryr|uirirr|wagras|swyuyau||) and need... (1 Reply)
Discussion started by: grajesh_955
1 Replies
3. Shell Programming and Scripting
Hello,
I am writting a script, which gets folder and search for *.zip files in to it.
If .zip files are available, then UNZIP all files into that folder only.
Here is my code,
for file in "$INPUT_FILE_FOLDER/"*.zip
do
unzip -d "$INPUT_FILE_FOLDER/" -oqq $file
done
If .zip files are... (2 Replies)
Discussion started by: Poonamol
2 Replies
4. Shell Programming and Scripting
Hi all !
If I run Xterm in backgprund mode &, when it stops I get this annoying messages on console:
Exit 15 xterm ...
Exit 15 xterm ...
How do can I remove this kind of ?
Thanks ! (3 Replies)
Discussion started by: jerold
3 Replies
5. UNIX for Dummies Questions & Answers
How to list out only the hidden files from a directory ?
Thanks (4 Replies)
Discussion started by: pandeesh
4 Replies
6. UNIX for Dummies Questions & Answers
I want to list all directories hidden or not hidden.
ls -ld */ => shows only not hidden directories
so i guess the answer would be to add the a option to show all files
ls -lad */ => not working :confused:
ls -la | grep "^d" => works
But I would like to know why I can't use ls -lad... (4 Replies)
Discussion started by: servus
4 Replies
7. Shell Programming and Scripting
Hi I have around 300 files in a folder. When I type ls -l I see the following
Mouse.chr10_+_:101862321-101863928.maf
Mouse.chr10_+_:101862322-101863928.maf
Mouse.chr10_+_:101862323-101863928.maf
But when I run my scripts, they couldn't recognise the filename because of hidden backslash like... (5 Replies)
Discussion started by: quincyjones
5 Replies
8. Shell Programming and Scripting
Hello.
I use this command :
rsync -av --include=".*" --dry-run "$A_FULL_PATH_S" "$A_FULL_PATH_D"The data comes from the output of a find command.
And no full source directories are in use, only some files.
Source example... (2 Replies)
Discussion started by: jcdole
2 Replies
LEARN ABOUT DEBIAN
cgi::xml
XML(3pm) User Contributed Perl Documentation XML(3pm)
NAME
CGI::XML - Perl extension for converting CGI.pm variables to/from XML
SYNOPSIS
use CGI::XML;
$q = new CGI::XML;
# convert CGI.pm variables to XML
$xml = $q->toXML;
$xml = $q->toXML($root);
# convert XML to CGI.pm variables
$q->toCGI($xml);
DESCRIPTION
The CGI::XML module converts CGI.pm variables to XML and vice versa.
CGI::XML is a subclass of CGI.pm, so it reads the CGI variables just as CGI.pm would.
METHODS
$q = new CGI::XML
creates a new instance of CGI::XML. You also have access to all of the methods in CGI.pm.
$q->toXML([$root])
where $root is an optional parameter that specifies the root element. By default, toXML will not return a root element.
$q->toCGI($xml)
where $xml is the XML you would like to convert to CGI.pm parameters. Values in the XML will overwrite any existing values if they
exist.
NOTE
CGI::XML does not currently handle multiple selections passed from HTML forms. This will be added in a future release.
AUTHOR
Jonathan Eisenzopf <eisen@pobox.com>
CONTRIBUTORS
David Black <dblack@candle.superlink.net>
SEE ALSO
perl(1), XML::Parser(3).
perl v5.8.8 2004-12-05 XML(3pm)