LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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-20-2013, 12:34 AM   #1
selvavinayak88
LQ Newbie
 
Registered: Nov 2012
Location: chennai
Posts: 18

Rep: Reputation: Disabled
set syntax options are not working in terminal


hi,

I did some thing to find new Tricks,
Here is my logic is used to find a particular file and open by automatically using VIM editor...

find $directory_location -type f -name $1 -exec vi {} \;

if I execute above script set syntax in vi editor is not working...

and also it showing error like E538: No mouse support: mouse=a

if anybody have Idea to resolve that....

Thanks,
selvavinayakam.na
 
Old 05-20-2013, 01:04 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,011

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Do some experiments eg:

Code:
#!/bin/sh
vi somefile # good/bad?
exec vi somefile # good/bad?
exec find . -name somefile -exec vi {} \; # good/bad?
vi $(find . -name somefile) # good/bad?
 
Old 05-20-2013, 10:57 AM   #3
selvavinayak88
LQ Newbie
 
Registered: Nov 2012
Location: chennai
Posts: 18

Original Poster
Rep: Reputation: Disabled
Smile

Hi NevemTeve,

Thanks for your reply,
below is my answer for ur questions....

[QUOTE=NevemTeve;4954642]Do some experiments eg:

[code]
#!/bin/sh
vi somefile # good/bad?-----> good
exec vi somefile # good/bad? ---> if put exec in front,after closing vi editor entire terminal is get closed....
exec find . -name somefile -exec vi {} \; # good/bad? --> ,, ,, ,, ,, ,,
vi $(find . -name somefile) # good/bad? ---> its working fine.

Thank u For sharing your knowledge...


Thanks,
selvavinayakam.na

Last edited by selvavinayak88; 05-20-2013 at 10:58 AM.
 
Old 05-21-2013, 12:23 PM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958
Give us some details here. We can't see what you're doing on your screen. Please show us exactly what commands you're using and the output you're getting.

What kind of arguments are you using? Are you sure you're matching the right thing? What output do you get if you use -print instead of -exec?

At the very least you need to double-quote your parameter ("$1") so that the expansion doesn't get word-split if the search pattern contains whitespace.

And please take a bit of time to learn how to correctly use ***[code][/code]*** (and quote) tags. Thanks.
 
Old 05-22-2013, 05:49 AM   #5
selvavinayak88
LQ Newbie
 
Registered: Nov 2012
Location: chennai
Posts: 18

Original Poster
Rep: Reputation: Disabled
Hi David,

Below is my comments for questions...

Give us some details here. We can't see what you're doing on your screen. Please show us exactly what commands you're using and the output you're getting.

selva---> my target is to create new tricks for find and open particular file in a simple command...
ie)
find $directory_location -type f -name $1 -exec vi {} \;
$directory_location --> directory path is here
$1 --> file name for search which pass from command line thro' script ...

above tricks is work but, i am not getting correct solution ie) vi terminal color system is not working fine...

What kind of arguments are you using? Are you sure you're matching the right thing? What output do you get if you use -print instead of -exec?
selva--->

1. File name as argument which is pass from command line.
2. yes..
3. ....

At the very least you need to double-quote your parameter ("$1") so that the expansion doesn't get word-split if the search pattern contains whitespace.

selva---> fYI I just mentioning like that in code original code is below...
find $directory_location -type f -name $1 -exec vi {} \;

And please take a bit of time to learn how to correctly use ****** (and quote) tags

Selva ---> Thanks for sharing link for reference Its usefully for update my knowledge

finally[NevemTeve] vi $(find . -name somefile) code is working fine ....

Thanks,
selvavinayakam.na
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Terminal with options? vonedaddy Linux - Newbie 1 10-12-2010 11:43 AM
working set window(keep track the working set)and page-fault frequency Medici Linux - Kernel 0 07-01-2010 02:38 AM
rpmrc syntax for proxy options cuco76 Linux - Software 2 02-01-2008 02:19 PM
C syntax for terminal amishmonkey Programming 3 09-11-2007 11:14 PM
kde terminal options dave37 Linux - Software 3 06-28-2007 08:00 AM


All times are GMT -5. The time now is 03:09 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration