![]() |
|
|
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 |
| Listing files with full path | r_sethu | UNIX for Dummies Questions & Answers | 5 | 06-15-2009 03:56 AM |
| List files with full path | mr_bold | Shell Programming and Scripting | 3 | 10-07-2008 01:19 PM |
| find & copy files with absolute path | jagnikam | Shell Programming and Scripting | 15 | 05-15-2008 07:00 PM |
| list all files with full path of the file | Sowser | UNIX for Advanced & Expert Users | 4 | 02-13-2007 05:46 PM |
| Removing duplicate files from list with different path | vino | Shell Programming and Scripting | 10 | 05-12-2005 09:44 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
how to cat files with path? Help plz
Hi,
I am trying to organize my data files and I would like to know how to cat files with path. Note that the correct command may not be "cat" though. For example, I have: abc/data/1/title dca/data/2/title gpd/data/1/title .... I'd like to have a file listing the title info from different directories, as well as directory paths. Thanks Simon |
|
||||
|
The output should be like: 48/pdata/1/title:ub2k63r, 1mM in PBS buffer, crp, for nemo titration 49/pdata/1/title:ub2k63r nemo titration, 1/5 nemo 50/pdata/1/title:ub2k63r nemo titration, 1/5 nemo 83/pdata/1/title:quick T2_2 of n15-NEMO+k63-Ub2 The text after colon( is the text written in the title file.Actually I succeeded once before, but I forgot what command(s) I used. I think I used "find", but can't make it work this time. Thanks, |
|
||||
|
Quote:
However, I am still confused. Could you be more detailed? Thanks |
|
||||
|
Quote:
Code:
find /path/to/files -type f -name "title" -exec nawk 'FNR==1{print FILENAME":"$0}' {} \;
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|