Log file | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Log file

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 08-13-2009
fido.genial fido.genial is offline
Registered User
 
Join Date: Jun 2009
Last Activity: 17 August 2009, 3:07 PM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Log file

Hi All,

I am new to Linux OS. I am trying to run a batch programs, so i using Shell script to run the batch files. And the binaries which i am running dumps log data to command prompt.I am trying to store this in log file ">log.txt". I have posted below my shell script code

************************************************** ********
#!/bin/sh

PATH=/bin:/prj/bin
/prj/bin/RunLibTestStatic -pf tiff.cfg -lqp 0 30 -lqp 1 32 >> out_qp30.txt
echo "Done."
************************************************** ********

This will create a file " OUT_QP~1.txt " instead of "out_qp30.txt"

please let me know how to correct this problem.

Thanks
fido
Sponsored Links
    #2  
Old 08-13-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 25 October 2014, 4:18 AM EDT
Location: NM
Posts: 10,251
Thanks: 283
Thanked 803 Times in 747 Posts
How are you looking at the file with the unix ls command or with dir in DOS? That is a DOS filename display, not UNIX or Linux.
Sponsored Links
    #3  
Old 08-13-2009
fido.genial fido.genial is offline
Registered User
 
Join Date: Jun 2009
Last Activity: 17 August 2009, 3:07 PM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by jim mcnamara View Post
How are you looking at the file with the unix ls command or with dir in DOS? That is a DOS filename display, not UNIX or Linux.

You are correct. I was looking from windows so it was showing me "OUT_QP~1.txt" but when i did "ls" it is showing me "outqp2.txt?" is there any way that i can get it has "outqp2.txt" when i am looking from windows.

Thanks
fido
    #4  
Old 08-13-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 25 October 2014, 4:18 AM EDT
Location: NM
Posts: 10,251
Thanks: 283
Thanked 803 Times in 747 Posts
No. Windows is windows. Are you running cygwin? Is that why you are looking at files thru Windows?

Cygwin has a windows-like screen you can use - it is called xwindows, on linux it could be called gnome, for example.
Sponsored Links
    #5  
Old 08-14-2009
fido.genial fido.genial is offline
Registered User
 
Join Date: Jun 2009
Last Activity: 17 August 2009, 3:07 PM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by jim mcnamara View Post
No. Windows is windows. Are you running cygwin? Is that why you are looking at files thru Windows?

Cygwin has a windows-like screen you can use - it is called xwindows, on linux it could be called gnome, for example.
I am using SecureCRT which is similar to Cygwin. I am running some script in unix and processing these log in windows but i see the file names are junk to use them. Please can you tell me any way to change these file name to actual names in unix or windows.

I have one more question. Even in unix when i do "ls" the log file name ends with "?" something like this "out_qp30.txt? " should i include something in the shell to remove this "?"


thanks
fido

Last edited by fido.genial; 08-14-2009 at 01:30 PM.. Reason: adding
Sponsored Links
    #6  
Old 08-14-2009
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 673 Times in 642 Posts
I get the impression that your disc partition is formatted FAT32 not NTFS (hence the MDSOS style filenames). No comment on how to fix it because there are too many unknowns.
Sponsored Links
    #7  
Old 08-17-2009
fido.genial fido.genial is offline
Registered User
 
Join Date: Jun 2009
Last Activity: 17 August 2009, 3:07 PM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by methyl View Post
I get the impression that your disc partition is formatted FAT32 not NTFS (hence the MDSOS style filenames). No comment on how to fix it because there are too many unknowns.
Thanks... I got it i was using windows editor for writing into shell script. I did dos2unix to make it work. now it is working properly.

Thanks
fido
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Read a file and search a value in another file create third file using AWK King Kalyan Shell Programming and Scripting 11 06-19-2009 12:05 AM
Need help with awk - how to read a content of a file from every file from file list tanit Shell Programming and Scripting 7 03-10-2009 05:19 AM
file size comparision local file and remote file dba.admin2008 Shell Programming and Scripting 4 11-13-2008 04:57 PM
Reading a file and writing the file name to a param file. thebeginer UNIX for Advanced & Expert Users 1 10-05-2007 04:38 PM
Reading file names from a file and executing the relative file from shell script anushilrai Shell Programming and Scripting 4 03-10-2006 04:25 AM



All times are GMT -4. The time now is 02:58 PM.