The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
strange expect script behavior, or am i misunderstanding expect scripting? v1k0d3n Shell Programming and Scripting 2 12-10-2008 04:31 PM
shell script which will delete every thing under a directory except a single sub dire alokjyotibal Shell Programming and Scripting 2 10-16-2008 04:53 AM
Strange behaviour from script in crontab PilotGoose Shell Programming and Scripting 1 06-26-2008 10:54 AM
Unix "cut' and "awk" in Windows XP? ihot Windows & DOS: Issues & Discussions 4 05-22-2008 06:24 AM
Perl script strange problem vaibhav Shell Programming and Scripting 2 11-23-2006 07:08 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 04-02-2009
sport sport is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 9
Question Strange thing with 'cut' in a script

When I run the script I have just created, I get a strange scenario around the following code:
echo "Check for duplicate UID's, each user should have a unique user ID (UID)"
echo "IF a UID is displayed fix or document why it is required!"
echo "Press enter to continue!"
read a
cut -d: -f3 /etc/passwd | sort -n | uniq -d
echo
echo "Verify current directory (.) does not exist in root's PATH!"

after going through most of the script and using the 'read a' as a pausing mechanism, when I hit enter at the above point instead of getting the correct value returned from the cut line, it just sits at a cursor, and hangs; it just adds a line for everytime you hit return. Now if I take the 'read a ' out at this point and just let it run right through the string works as it is supposed to. Can anyone see why it would behave in this fashion?
 

Bookmarks

Tags
cut, script.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0