![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help-prompt for path and take this as input in find command | bsandeep_80 | UNIX for Advanced & Expert Users | 7 | 01-21-2009 04:49 PM |
| Using output to input another command | rodrimuino | Shell Programming and Scripting | 3 | 02-14-2008 12:37 PM |
| Using Output from one command as input to another | BkontheShell718 | Shell Programming and Scripting | 2 | 12-26-2007 04:23 PM |
| Using find command with awk or basename | sam_78_nyc | Shell Programming and Scripting | 4 | 11-05-2007 07:49 PM |
| find files and using them as input arguements for another command | bobbygrep | UNIX for Dummies Questions & Answers | 1 | 07-18-2001 06:24 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script. I am planning to do like this: if [ `find /path/abc* | wc -l` == 1 ]; then x=`find /path/abc*` y=`basename $x` fi I am triying to combine x=`find... and y=`basename... into one sentence using "|". y=`find /path/abc* | basename` But I am getting below error: Usage: basename String [Suffix] Can any one suggest if there is a better way to do this or help me combine these two commands into one. Thank you. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|