LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Having an error in my bash shell while trying to create a simple shell script (https://www.linuxquestions.org/questions/linux-newbie-8/having-an-error-in-my-bash-shell-while-trying-to-create-a-simple-shell-script-4175725318/)

!Yes 05-22-2023 01:44 PM

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

TB0ne 05-22-2023 01:50 PM

Quote:

Originally Posted by !Yes (Post 6432329)
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.

pan64 05-22-2023 02:13 PM

https://www.linuxquestions.org/quest...or-4175530270/

metaed 05-22-2023 02:19 PM

Quote:

Originally Posted by !Yes (Post 6432329)
‘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

MadeInGermany 05-22-2023 07:23 PM

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.

grail 05-22-2023 10:44 PM

@MadeInGermany - now you are just making me feel old :)

!Yes 05-23-2023 12:37 PM

Thank y'all so much for the help 🙏🏽 It's great to see a site that really helps people this days

pandanuma 05-23-2023 03:17 PM

Quote:

Originally Posted by pan64 (Post 6432335)

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...

JJJCR 05-24-2023 02:21 AM

This may help:
https://staff.washington.edu/rells/R110/
https://www.redhat.com/sysadmin/introduction-vi-editor


All times are GMT -5. The time now is 06:16 AM.