LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 06-27-2008, 07:16 AM   #1
chochem
LQ Newbie
 
Registered: May 2008
Posts: 29

Rep: Reputation: 15
Shell: tr can only be used when given full path (despite being in $PATH)


I recently did a reinstall of ubuntu 8.04 and many of my scripts started malfunctioning. Checking up on it, I found that all 'tr' operations result in the error 'Broken pipe', as in
Code:
chochem@MYLAPTOP:~$ echo test
test
chochem@MYLAPTOP:~$ echo test | tr -d t
bash: echo: write error: Broken pipe
Further checking: tr can be used but only when given full path, i.e.
Code:
chochem@MYLAPTOP:~$ echo test | /usr/bin/tr -d t
es
(or when settting an alias: alias tr='/usr/bin/tr')
echo $PATH clearly indicates that /usr/bin is in path, and other /usr/bin apps work just fine. tr has execution permissions for everybody. Doing 'tr' just gives me a new line.

Can anybody explain this?
 
Old 06-27-2008, 07:18 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 62
What is the output of this command?
Code:
type tr
 
Old 06-27-2008, 08:37 AM   #3
chochem
LQ Newbie
 
Registered: May 2008
Posts: 29

Original Poster
Rep: Reputation: 15
D'oh... an empty shell script by the same name was in my home bin directory Thanks for the suggestion.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Full Path Verbal Kint Linux - General 7 01-30-2008 09:34 PM
Need to specify the full URL path.. Why? soichih Linux - Networking 3 07-31-2004 08:37 AM
get full path of a command (in C) Hady Programming 9 11-21-2003 10:50 AM
get full path of a command (in C) Hady Linux - Software 1 11-19-2003 05:46 PM
Full Path problems chedmaster Linux - Newbie 1 06-26-2003 10:24 AM


All times are GMT -5. The time now is 12:39 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration