LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-22-2009, 09:05 AM   #1
rwalsh26
LQ Newbie
 
Registered: May 2009
Posts: 1

Rep: Reputation: 0
Can't run "cd" with xargs


I'm trying to use xargs within a script as follows and I'm not sure why the command is failing:
rwalsh05@linux-tax7:/usr/lib> ls|grep -E '^python2.'|xargs -t cd
cd python2.5
xargs: cd: No such file or directory
The point is to cd to /usr/lib/python2.5 from /usr/lib. I'm using ls with xargs to pick out the correct directory to change to since /usr/lib contains "python" and "python2.5"
 
Old 05-22-2009, 09:25 AM   #2
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
Code:
cd `ls|grep -E '^python2.'`
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
WILL THE "1D Stock Cutter" AND "OPTIMIK 2.36c" RUN IN LINUX NOVILINUX Linux - Software 3 01-12-2009 03:30 PM
Why my wireless card "atheros" run only as an acces point in "Master" mode. jardiamj Linux - Wireless Networking 3 11-11-2007 12:12 AM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
Several "find -exec" and "find | xargs" questions thanhvn Programming 4 12-02-2005 01:04 PM
Can't run "halt" or "reboot" as user, can somebody help? ro_nicu Slackware 4 11-01-2004 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:01 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration