nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

problem in script

This is a discussion on problem in script within the Getting started tutorials forums, part of the Linux Getting Started category; Hi all, I want to parse files from bit keeper command’s output. This command gives output something like below, Client/webnms/screens/vmg/SVmgMms.java: ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-14-2007, 04:25 PM
Junior Member
User
 
Join Date: Sep 2007
My distro: Debian
Posts: 1
Rep Power: 0
sania is on a distinguished road
Default problem in script

Hi all,

I want to parse files from bit keeper command’s output.
This command gives output something like below,

Client/webnms/screens/vmg/SVmgMms.java: 1.6 1.7 sture 07/09/13 09:37:11
Client/webnms/screens/vmg/SVmgMmsConfig.java: 1.4 1.5 sture 07/09/13 09:37:19
Server/configupdate/configupdateimpl.cc: 1.34 1.35 sture 07/09/13 10:05:30


Now I want to separate out java and cc file names (only name
So I created command

bk -Rr info' | awk '{print $1}' | tr ':' ' ' | grep '.cc’ ---- for cc files

bk -Rr info' | awk '{print $1}' | tr ':' ' ' | grep '.java’ ---- for java files

Which works nicely on command prompt. But now I want to put them in script so I wrote following lines,


LS=`bk -Rr info`
OP=`$LS | awk '{print $1}' | tr ':' ' ' | grep '.java'`
echo $OP


But it is giving op as follows,

./script3.sh: Client/webnms/screens/vmg/SVmgMms.java:: No such file or directory

Client/webnms/screens/vmg/SVmgMms.java Client/webnms/screens/vmg/SVmgMmsConfig.java Server/configupdate/configupdateimpl.cc
Client/webnms/screens/vmg/SVmgMms.java: /bin: is a directory
Client/webnms/screens/vmg/SVmgMms.java: 3rdparty: command not found
: command not foundns/vmg/SVmgMms.java: *
Client/webnms/screens/vmg/SVmgMms.java: 3rdparty: command not found
: command not foundns/vmg/SVmgMms.java: *
Client/webnms/screens/vmg/SVmgMms.java: 3rdparty: command not found


What is mistake here?
Reply With Quote
Sponsored Links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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

Similar Threads

Thread Thread Starter Forum Replies Last Post
problem with System + MySQL backup script massoo Shell scripting 1 08-20-2007 09:50 PM


All times are GMT +5.5. The time now is 05:04 PM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36