LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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-22-2023, 01:44 PM   #1
!Yes
LQ Newbie
 
Registered: May 2023
Posts: 2

Rep: Reputation: 1
Having an error in my bash shell while trying to create a simple shell script


I wanted to create a simple shell script for the first time but it keeps showing this problem ‘E348: No string under cursor’

Please how can i solve this

Last edited by !Yes; 05-22-2023 at 01:46 PM.
 
Old 05-22-2023, 01:50 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,705

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by !Yes View Post
I wanted to create a simple shell script for the first time but it keeps showing this problem ‘E348: No string under cursor’ Please how can i solve this
No idea, since you've not given us ANYTHING useful to work with. What do you think we'll be able to tell you, based on what you wrote?? We can't see your script, know about your system, where you're getting that message (or when), etc.

Post your script along with useful details and we can try to help.
 
Old 05-22-2023, 02:13 PM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,970

Rep: Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334Reputation: 7334
https://www.linuxquestions.org/quest...or-4175530270/
 
2 members found this post helpful.
Old 05-22-2023, 02:19 PM   #4
metaed
Member
 
Registered: Apr 2022
Location: US
Distribution: Slackware64 15.0
Posts: 371

Rep: Reputation: 172Reputation: 172
Quote:
Originally Posted by !Yes View Post
‘E348: No string under cursor’
This message is from your text editor vi or vim. It appears when you try to insert a punctuation character, such as '#', into the file you opened, but the editor has not yet been placed in "insert" mode.

This tells me you have not used vi or vim before. Before you try to enter your script, I recommend you take a beginner's vi tutorial.

Maybe try: https://www.openvim.com/

Cheers! Edward
 
4 members found this post helpful.
Old 05-22-2023, 07:23 PM   #5
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,809

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
Before you run "vi" or "vim", run "vimtutor"
And really read and do everything!

Vim is a bit archaic but is fast and powerful.
It starts in command mode, the i key puts you to insert mode, and the ESC key back to command mode.
 
2 members found this post helpful.
Old 05-22-2023, 10:44 PM   #6
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,009

Rep: Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193
@MadeInGermany - now you are just making me feel old
 
1 members found this post helpful.
Old 05-23-2023, 12:37 PM   #7
!Yes
LQ Newbie
 
Registered: May 2023
Posts: 2

Original Poster
Rep: Reputation: 1
Thank y'all so much for the help 🙏🏽 It's great to see a site that really helps people this days
 
1 members found this post helpful.
Old 05-23-2023, 03:17 PM   #8
pandanuma
Member
 
Registered: May 2005
Location: greatwhitenorth
Distribution: deb99+
Posts: 134
Blog Entries: 10

Rep: Reputation: 37
Quote:
Originally Posted by pan64 View Post
2cents worth of my s.H.t.umbling Opinion...

after quickly scanning the replies to this question, i tried to solve it by ducking it.
duckduckgo search for: "E348: No string under cursor "
the first link, the same one provided by pan64, shows it was solved on lq eight years ago
it seems the lqguru.s and the lqaddicts have gotten tired of informing newbies how to find their answers by asking the right question.
if pan64 had included a wag of the finger to the newbie on how to start a new thread with the error code as the subject, then maybe the 8 year old solution would have shown up in the .click here for similar threads. link...
so...give the man a fish...with instructions on how to catch his own
...and other newbies reading this thread might learn also

so long and thanks for all the fish
i go now to read a few of tbone's fine links in his signature line...
 
Old 05-24-2023, 02:21 AM   #9
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,162

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
This may help:
https://staff.washington.edu/rells/R110/
https://www.redhat.com/sysadmin/introduction-vi-editor
 
1 members found this post helpful.
  


Reply



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
Could not initialize SDL(x11 not available) error while I'm trying to start automatically a bash script which configures a qemu virtual mach marietto Ubuntu 2 04-18-2021 05:09 AM
[SOLVED] Is it possible to create a bash script to create multiple new bash scripts Batistuta_g_2000 Linux - Newbie 6 02-19-2013 11:42 AM
having error while i'm trying installing wireshark izual Linux - Newbie 1 11-17-2012 02:23 PM
Bash Script Help - Trying to create a variable inside script when run. webaccounts Linux - Newbie 1 06-09-2008 02:40 PM
Bash script to create bash script jag7720 Programming 10 09-10-2007 07:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:21 AM.

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
Open Source Consulting | Domain Registration