PDA

View Full Version : Formatting problem



LittleLebowski
March 29th, 2007, 03:47 PM
I'm trying to copy and paste sscript written by a colleague on a Windows box and run it on a Solaris box. I'm copying from a GEdit/Kedit opened .txt file and no matter what I do, it runs incorrectly. I tried running dos2unix on the file. Any ideas? I'm running Feisty but this problem existed on Dapper as well.

Mirrorball
March 29th, 2007, 03:53 PM
On Kate, you can go to Tools -> End of line and select Windows/DOS. You can also run a script to substitute "\n" for "\r\n" in this file.

LittleLebowski
March 29th, 2007, 04:08 PM
Thanks for quick reply! Unfortunately that didn't work. Getting frustrated here.

WW
March 29th, 2007, 04:39 PM
"It runs incorrectly" is a bit vague. Give some more details.

LittleLebowski
March 29th, 2007, 04:47 PM
It gives the proper results as in a grep for "FW" returns only "FW" results when ran from a Windows box or another Unix box aside from my Ubuntu box. When run form my Ubuntu box it returns "FM and "FD."

How it should look:
[root@phantom: /tmp]# echo -n `mminfo -m -t '3/23/07' | grep FW | awk '{print $1}'` > wt
[root@phantom: /tmp]# for r in `cat wt`; do echo $r; done | xargs -i@ mminfo -a @ | egrep "3/23|3/24|3/25|3/26" | awk '{print $1}' | sort | uniq
mminfo: no matches found for the query
mminfo: no matches found for the query
mminfo: no matches found for the query
mminfo: no matches found for the query
FW4092
FW4095
FW4096
FW4098
FW4099
FW4100
FW4102
FW4104
FW4106
FW4107
FW4108
FW4650

------------------------------------------------------------------------------------------------------------------------------------

What it looks like from my box.

[root@phantom: /tmp]# echo -n `mminfo -m -t '3/24/07' | grep FW | awk '{print $1}'` > wt
[root@phantom: /tmp]# mminfo -a `cat wt` | egrep "3/24|3/25|3/26|3/27" | awk '{print $1}' | sort | uniq

FD4008
FD4009
FD4010
FM4123
FM4124
FM4125
FW4099
FW4100
FW4102
FW4104
FW4106
FW4107
FW4108
FW4109

Mr. C.
March 29th, 2007, 08:44 PM
Oh my, that's convoluted.

You're going to have to provide us with a few lines of output from the mminfo command.

I have no idea what its output is. Once you show that, we'll help with the rest.

MrC