Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Shell Script is messed up from opening in Kwrite?
Results 1 to 10 of 13

Thread: Shell Script is messed up from opening in Kwrite?

Hybrid View

  1. #1

    Shell Script is messed up from opening in Kwrite?

    I am in a bit of a bind... I soon tired of opening my super long backup script in vi, so while I was logged in, I opened it in KWrite. Well, now, I can see these little tick marks at the beginning of each line that has characters. Now, that isn't a problem in itself, but the script is now inop. WOW, I mean, this thing is doing all sorts of craziness. I am wondering if opening it in KWrite messed it up, as far as different new lines/carriage returns, and if I can salvage it. Any help would be AWESOME, so that I don't have to retype this bohemoth. Thanks!
    Asus A8V Deluxe Mobo
    AMD Athlon64 X2 4400 -939
    2GB Crucial DDR3200 Dual-Channel
    ATi AiW 9800 Pro 128DDR
    Audigy2 ZS
    Sony DRU-810 DVD+RW DL
    3 x Maxtor MaxLine SATA 160Gb 16Mb Cache
    1 x Maxtor MaxLine SATA 300Gb 16Mb Cache
    1 x Maxtor MaxLine SATA 120Gb 16Mb Cache

  2. #2
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811
    if it's caused by CRLF instead of *nix LF, then this should sort it out:
    # cat file | perl -pe 's/\015//' >! new_file
    or
    # cat file | col -bf >! new_file
    But from your description of little tick marks at the beginning of each line that has characters. dosn't sound to me like a LF/CRLF issue.. Normaly that would provide '^M' at the end of each line..
    Last edited by redhead; 06-18-2006 at 08:17 PM.
    Don't worry Ma'am. We're university students, - We know what We're doing.
    'Ruiat coelum, fiat voluntas tua.'
    Datalogi - en livsstil; Intet liv, ingen stil.

  3. #3
    I am an idiot... I still don't know what the little marks are... I am thinking that they might be because the line wraps to the next, but I am not sure. Anyways, I noticed that I missed a " mark in the script (which is odd, because it was working just fine the other day, and I don't recall having messed with it), AND for some odd reason, I had the script trying to do some SSH commands... before the remote server was even awakened. Geez...
    I will fix these minor issues, and hopefully, all will be well. Hopefully...
    Asus A8V Deluxe Mobo
    AMD Athlon64 X2 4400 -939
    2GB Crucial DDR3200 Dual-Channel
    ATi AiW 9800 Pro 128DDR
    Audigy2 ZS
    Sony DRU-810 DVD+RW DL
    3 x Maxtor MaxLine SATA 160Gb 16Mb Cache
    1 x Maxtor MaxLine SATA 300Gb 16Mb Cache
    1 x Maxtor MaxLine SATA 120Gb 16Mb Cache

  4. #4
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935
    See, that's why you never use WYSIWYG writers. If you want GUI, use something like GVIM, GEDIT or KEDIT.

    To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
    - The truely community run Linux/Floss forum !

    No IT BS !!

  5. #5
    I am a little confused (sorry...). The only time I have ever heard of WYSIWYG editing, is when referenced to web design, and I totally agree. I do all of my pages by hand in a text editor, with the exception of hyperlinks (if the page has a lot of links, I prefer to open it in Dreamweaver, as you can just click and drag to establish a link... MUCH faster than me typing 200 links). How does KWrite qualify as WYSIWYG? It has syntax highlighting, so if anything, I should have noticed that things were screwy when parts of my script were the wrong color... Do the other editors show special symbols and such (like new lines, carriage returns, etc..)? If that is the case, then maybe I SHOULD use one of those editors, so I can at least see what is going on. I mean, I have a HAIR of experience, but when something goes wrong, I can sometimes be a little screwed. Maybe using one of these editors would help educated me...
    Asus A8V Deluxe Mobo
    AMD Athlon64 X2 4400 -939
    2GB Crucial DDR3200 Dual-Channel
    ATi AiW 9800 Pro 128DDR
    Audigy2 ZS
    Sony DRU-810 DVD+RW DL
    3 x Maxtor MaxLine SATA 160Gb 16Mb Cache
    1 x Maxtor MaxLine SATA 300Gb 16Mb Cache
    1 x Maxtor MaxLine SATA 120Gb 16Mb Cache

  6. #6
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811
    http://en.wikipedia.org/wiki/WYSIWYG
    Basicaly it's creating a nice surface where you see what a "printed version" would look like, meaning any hidden codes to change text styles and such are not visible.
    It's like combining typing a LaTeX document in vi as opposed to making it in LyX
    Meaning after opening, saving from a WYSIWYG editor, it might convert/add something to the document in orer to know, exactly how to show it to you, but in a shell script, where every char is vital, it might screw it up.

    //edit
    For realy keeping an eye out on what is happening, Lawrence Mitchell has written an emacs mode for showing whitespaces, newlines, tabs etc. Originaly it was ment as a help for programming in whitespace, but I guess it would be useful here aswell.
    Last edited by redhead; 06-20-2006 at 04:43 PM.
    Don't worry Ma'am. We're university students, - We know what We're doing.
    'Ruiat coelum, fiat voluntas tua.'
    Datalogi - en livsstil; Intet liv, ingen stil.

Similar Threads

  1. Shell script coding
    By lab in forum Programming
    Replies: 0
    Last Post: 07-14-2012, 05:18 AM
  2. Shell script coding
    By lab in forum Programming
    Replies: 0
    Last Post: 07-05-2012, 01:49 PM
  3. Shell script for geoiplookup cmd
    By Hariharan in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 10-19-2010, 10:18 AM
  4. Need of shell script
    By Hariharan in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 09-16-2010, 02:34 PM
  5. Shell script for monitoring
    By Hariharan in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 09-16-2010, 05:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •