UWIN question


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers UWIN question
# 1  
Old 03-25-2009
UWIN question

Hi

I've installed uwin4.2 on 2 boxes a Win Xp and Window 2003 server.
I have a simple script that I invoke form the command prompt like so
ksh {c:\script} on the XP box it works. On the 2003 it just hangs ! Any ideas. here is the script

Code:
#!/usr/bin/ksh

echo hello
cat /etc/mailx.rc
TEMPFILE="/var/tmp/sgcreport.147464"
test1="/tmp/ums.out"
TEST=`grep "LoginVerifyThread" $test1| /usr/bin/awk {'print $2'}`
TEST2=`grep "NetWorker savegroup" $TEMPFILE|awk {'print $4'}`
echo $TEST
echo $TEST2


On the 2003 box as soon as it gets to the first TEST it freezes. Again this is a test I am trying to do you can use any file and grep something inside of it!

Your help would be greatly appreciated

Last edited by Yogesh Sawant; 03-26-2009 at 03:38 AM.. Reason: added code tags
# 2  
Old 03-26-2009
Try running
Code:
grep "LoginVerifyThread" /tmp/ums.out | /usr/bin/awk {'print $2'}

from the shell prompt and see what happens.

The UWIN list archives are at https://mailman.research.att.com/pipermail/uwin-users/
# 3  
Old 03-26-2009
In the uwin shell it works...It's just when I run it from a windows command prompt with ksh {script}

If I run it like this

Code:
C:\Program Files\UWIN\usr\bin>ksh "grep "LoginVerifyThread" /tmp/ums.out | /usr/bin/awk {'print $2'}"

It hangs

Last edited by Yogesh Sawant; 03-26-2009 at 02:46 PM.. Reason: added code tags
# 4  
Old 03-27-2009
Try:
Code:
C:\Program Files\UWIN\usr\bin>ksh "/usr/bin/grep 'LoginVerifyThread' /tmp/ums.out | /usr/bin/awk {'print $2'}"

 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get Hostname in UNIX like environment in Windows (Cgwin, UWin)

Hi, I'm using UWIN (from at&t - a cygwin like environment) in my personal computer to show Unix like environment to someone new to Unix. Though UWin has Ksh command box, wanted to show Putty to that person. My question is. How to connect to Cygwin (or UWin) installed in personal computer... (2 Replies)
Discussion started by: bobbygsk
2 Replies

2. UNIX for Dummies Questions & Answers

Ls -l question

Hi, When doing ls -l, is it right to assume that all files with the date and time on it are files that are created/modified on the current year? Is there any way to display the creation/modified date of a file that are not created/modified in the current year? (4 Replies)
Discussion started by: newbie_01
4 Replies

3. UNIX for Dummies Questions & Answers

How to save a shell script in Uwin

Hi All, Actually im new to Unix and trying to learn shell scripting in uwin(freeware) on windows xp machine. I tried writing the shell script with vi mode, but my problem is I am unable to save this script file even after specifying :wq option ie I am unable to save the file and quit from vi mode... (1 Reply)
Discussion started by: vikkram
1 Replies

4. UNIX for Dummies Questions & Answers

Question about -n

Hello there, New user/ poster that just joined, really quick question as I couldnt find it through the search function In this script echo -n "enter your username " read username if then echo "Hello $username!" exit 0 else echo "You did not provide a vaild name!" exit 1... (2 Replies)
Discussion started by: kingpin007
2 Replies

5. Shell Programming and Scripting

question

how do i write a script that'll open what i entered and scan it for a certain line of text. for example, i enter a filename (that exists) and in that file i want to scan a certain word that'll show how much of that word appears throughout the file. (2 Replies)
Discussion started by: mrhenry
2 Replies

6. UNIX for Dummies Questions & Answers

A question?

using my unix os, can i do any autoexec.bat editing in order to execute selected programs that i use most often? :confused: (1 Reply)
Discussion started by: alecks1975
1 Replies

7. UNIX for Dummies Questions & Answers

uising ed in wipro uwin unix emulator

i have no clue what I am doing with the ed editor since i have never really used it.. the only thing is the sed edittor on the unix emulator I downloaded for windows is rather simple and the man pages are very vague... it doesn't function according to most linux operating systems that envoke sed..... (4 Replies)
Discussion started by: moxxx68
4 Replies

8. UNIX for Dummies Questions & Answers

Questions about UWIN?

so is UWIN like an emulator that sits on top of Windows or is like VMWare or Virtual PC where it is an X86 emulator inside of Windows? (1 Reply)
Discussion started by: wmosley2
1 Replies

9. UNIX for Dummies Questions & Answers

Next Question:

what is the function of swap in linux why i have to create apsolutely a particion for the swap when i install (i installed lnx4win mandrake and made an automat. disk particion and the install program one of my disk partitions that was 3gb devidet in 4 one native 700mb swap 600mb and the others i... (1 Reply)
Discussion started by: user666
1 Replies
Login or Register to Ask a Question