i need to extract the data as below from this file.
/home/cvs/gkc ->awk -v RS= '{print $(NF-2),$(NF-1),$NF}' test.txt
Buildfile: build.xml Buildfile: build.xml
Created dir: /dist/advance/2.0.4/20060926-0413
awk: The field -1 must be in the range 0 to 199.
The input line number is 3. The file is test.txt.
The source line number is 1.
I am getting all of the above errors i need only the following /dist/advance/2.0.4/20060926-0413 from that file without any spaces.
so that i will be using this data in another command.
create-tar:
[echo] Module : source-fileLayouts
[tar] Building tar: /dist/advance/2.0.4/20060926-0413/source-fileLayouts.tar
[tar] Building tar: /dist/advance/2.0.4/20060926-0413/source-broker.tar
[tar] Building tar: /dist/advance/2.0.4/20060926-0413/source-userExits.tar
[exec] ./cobbuff/co*ed* not found
[exec] ./cobbuff/db*ed* not found
[gzip] Building: /dist/advance/2.0.4/20060926-0413/source-userExits.tar.gz
[delete] Deleting: /dist/advance/2.0.4/20060926-0413/source-userExits.tar
[gzip] Building: /dist/advance/2.0.4/20060926-0413/source-fileLayouts.tar.gz
[delete] Deleting: /dist/advance/2.0.4/20060926-0413/source-fileLayouts.tar
[gzip] Building: /dist/advance/2.0.4/20060926-0413/source-broker.tar.gz
[exec] ./coblist/co*ed* not found
[exec] ./coblist/db*ed* not found
[exec] ./cobsize/co*ed* not found
[exec] ./cobsize/db*ed* not found
[delete] Deleting: /dist/advance/2.0.4/20060926-0413/source-broker.tar
[tar] Building tar: /dist/advance/2.0.4/20060926-0413/source-reports.tar
[gzip] Building: /dist/advance/2.0.4/20060926-0413/source-reports.tar.gz
[tar] Building tar: /dist/advance/2.0.4/20060926-0413/source-advance.tar
[delete] Deleting: /dist/advance/2.0.4/20060926-0413/source-reports.tar
[gzip] Building: /dist/advance/2.0.4/20060926-0413/source-advance.tar.gz
[delete] Deleting: /dist/advance/2.0.4/20060926-0413/source-advance.tar
when i run that comamnd i get
grep /dist/advance/2.0.4/20060926-0413 test.txt | tr -d ' '
all the releated path.. in the file.
Conditons:
1) I need to dipslay only one line from the above file.
like when i run my script i need to get as below
/dist/advance/2.0.4/20060926-0413 with out any spaces.
2) "/2.0.4/20060926-0413 " will be changing ..for different files.
i will be using the output in another script as a variable.