Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. kumariaru

    FTP host and port number in one parameter to the shell script

    Hi I tired both the options in the script and they did nt work. Manually I am able to connect with a space but not with colon. It is korn script and ftp is normal (not secured). I would like to post the script but I am restricted not to. Thanks for the help! kumari
  2. kumariaru

    FTP host and port number in one parameter to the shell script

    Hi All, Is it possible to assign FTP hostname & portnumber in one parameter? To the current script we have the values are passed via csv file(comma seperated values). This csv file consists of multiple FTP host records and all hosts got default port number. Now for one of our server there is a...
  3. kumariaru

    Timestamp and Char comparision

    Hi, I need to compare value1= '2010-06-03 22:29:42:109615'(this in character) and to a timestamp field value2='16-JUL-10 04.42.44.296985000 PM' in a SQL. Table value format is: 16-JUL-10 04.42.44.296985000 PM' Value compared format is:'2010-08-03 22:29:42:109615' I need to display values...
  4. kumariaru

    Total count of the days SQL....

    Thank you Ian,
  5. kumariaru

    Total count of the days SQL....

    Good Morning All, I have a scenario where I have to get the total count of the days. Data in the table: col1 col2 col3 101 12/12/06 A 101 02/15/07 H 101 03/10/07 B 101 04/18/07 C 101 05/27/07 H 101...
  6. kumariaru

    Multiple files to one and copying to a folder..

    Thank you All, It worked...
  7. kumariaru

    How to get rid of control M on Unix...

    Hi All, I have a script which takes multiple files from a UNIX server and renames them and put to a Unix folder. Below is the script: SrcDir=$1 cd $SrcDir ls *_*.txt | nawk ' {x=$0;sub(/_.*\.txt$/,".txt",x); printf "cp %s /ap/test/cat/%s\n",$0,x} ' |sh -v I am successfully moving all the...
  8. kumariaru

    Multiple files to one and copying to a folder..

    Good Morning All, I have to write a script to concatenate multiple files to a single and move the file to other folder. We mayget a single file or two files or more..it depends..I have to put them all file to a single file and move to a new folder.All files will be in same structure(mean same...
  9. kumariaru

    Email Notification....

    It is working.... Thanks a lot...
  10. kumariaru

    Email Notification....

    Hi All... Thanks a lot.. I do nt have "mutt" command on my UNIX. I tried using the mail command instead of mutt& it is not sending a mail..but it is creating a file called dead.letter in default folder... I used both scripts... Thanks in advance....
  11. kumariaru

    Email Notification....

    Hi All I have to send an email if the count of the folder does nt match with what expected. #!/bin/ksh/ #Sends an email if the count of the files in a folder are less then expected SrcDir=$1 Count=$2 cd $SrcDir | ls -l | wc -l -ne $Count && mutt -s "The count of $SrcDir is not equal to...
  12. kumariaru

    Files list to a file..

    Hi Feherke.. I tested with both the scripts, the scripts executed good but the output into the file is in this format: /Srcdirectory/File1.txt,2 /Srcdirectory/File2.txt,78 /Srcdirectory/File3.txt,100 /Srcdirectory/File4.txt,90 /Srcdirectory/File5.txt,78 I used both the scripts to this...
  13. kumariaru

    Files list to a file..

    Hi All, I want a list of files sent to a file with word count. Ex: Srcdirectory: File1.txt File2.txt File3.txt File4.txt File5.txt . .. I need a to build a file in this way Filename,Count File1.txt,2 File2.txt,78 File3.txt,100 File4.txt,90 File5.txt,78 And I want to overwrite this...
  14. kumariaru

    Multiple files to rename...

    Hi PHV & Annihilannic, Thanks a lot. The script is working. I changed awk to nawk. Thank you
  15. kumariaru

    Multiple files to rename...

    Hi PHV.. Thanks a lot. I am getting below errors when i am executing the below script.. awk: syntax error near line 2 awk: illegal statement near line 2 cd /tmp/target ls *_*.txt | awk ' {x=$0;sub(/_.*\.txt$/,".txt",x); printf "cp % s /tmp/source /%s\n",$0,x} ' |sh -v
  16. kumariaru

    Multiple files to rename...

    Hi All, I need to rename multiple files after copying them to a folder from other folder. I am getting files in this format.. test_20070513.txt, test1_20070513.txt,... I want to strip the _ & date and I want file names to be as test.txt, test1.txt,..... I am trying to do something...
  17. kumariaru

    Script to send am email...

    Hi Feherke.. Yes I have readable and executable permissions for the folder and the MAIN folder exists in the path..I created a script to do word count of a file from the MAIN folder and it is giving the output.... Thanks
  18. kumariaru

    Script to send am email...

    Hi All... I am trying to execute below script to check the count of multiple files in the MAIN folder. And if the count is 2 then send an email with the file name. If there are two files with line count 2 then send 2 emails with respective filnames. I was given this code for my previous...
  19. kumariaru

    Message through email....

    Good Morning All, I have a a problem with wc -l. When I am opening a file with in vi editor I can see 2 lines in it but when I am doing a "wc -l filename" I am getting only 1 as output. It is same with all the files.I am getting word count of total records -1.These files are in DOS format and...
  20. kumariaru

    Message through email....

    Thank you Feherke and Sam... I will check with both the scripts.....

Part and Inventory Search

Back
Top