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

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

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

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