Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-09-2014, 04:18 PM   #1
LQ Newbie
Registered: May 2014
Posts: 2

Rep: Reputation: Disabled
Post li\ in a script

I am fighting with a script for a class and I have come across a issue with my script bombing out after line 10 which is nothing but li\. That is a lower case l(el) and a lower case i(eye) followed by a backslash. We were given the code and told to create a tab delimited database to run this against. I have been told there is something wrong with my database. I'll give a sample of both. **I have tried multiple databases with spaces, no tabs, single tabs, double tabs, triple tabs, tabs but no carriage returns. I am lost.

the part of the script

the part of the database which is tab delimited
north NO Margot Weber 4.5 .89 5 9

central CT Ann Stephens 5.7 .94 5 13

the command I am running the script against the database is supposed to be

sed -f script database > outfile

Any ideas what li\ should do besides bomb out?
Old 05-09-2014, 05:21 PM   #2
Senior Member
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
Normally \ is used as an 'escape' meaning any special meaning of the next char is ignored

Since it is homework, not much I can do.. the idea is you work it out

Read the manual for your text editor, see if you can find how to display 'hidden' stuff

an example

echo foo\
Press enter after the \

If you type that on bash command line you get

bash ignored the <enter>

With magic stuff in an editor, you may see

echo foo\$

Last edited by Firerat; 05-09-2014 at 05:24 PM.
Old 05-09-2014, 05:38 PM   #3
LQ Newbie
Registered: May 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
I have looked at my script with :set list. No extra characters. No extra characters other than tabs in the database either. If I remove he \ from behind li, the script works but places li as a word towards the end of the script. Why would it not work with the \. I know this is for a class but I am trying to learn what this combination does. I have read 4 chapter over again, scoured the internet and spent the better part of 12 hours this week just trying to figure out why a script would bomb because of li\. All I am asking for is a little help understanding what li\ is supposed to accomplish. I cannot find any reference anywhere on what this combination does.


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
Shell script/Perl Script to remove the string until it finds special character '_' pooppp Programming 10 07-17-2012 09:36 AM
Shell script/Perl Script to remove the string until it finds special character '_' pooppp Programming 1 07-13-2012 01:03 AM
Shell script, Perl script, command or utility to convert Binary to text Perseus Programming 26 07-12-2012 06:00 AM
[SOLVED] Script question: create a shell script in kde to log in on a server with ssh c4719929 Linux - Newbie 1 01-31-2011 03:05 AM
How to get full path to script file inside script itself? And in case of sym links? maggus Linux - Newbie 3 05-28-2009 08:40 AM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration