General :: Bash Shell Syntax For Opening A Text Editor?

Apr 28, 2011

I'm trying to be able to Open a text editor without needing an existing file.This is my code:

case $ans in
"Show Today") echo "$(date)";;
"Show Calendar") cal;;

[code]...

View 14 Replies


ADVERTISEMENT

General :: Opening Files In Text Editor From The Terminal

Mar 7, 2010

Using ubuntu 9.10

If I'm in a terminal window, and I open a file by typing eg :

It opens as a blank document... I know it has text in it though!

I've tried with other files and also with nano so it's not just a problem with a particular file.

How do I view the current contents of the file so I can then edit it?

View 4 Replies View Related

General :: Custom Syntax Highlighting In Bash Shell - Using Keywords

Apr 25, 2011

I know it's possible to change the $ user@hostname colors, but is it possible to color different things? Could I make all numbers/integers a certain color. Or set certain keywords to be bold?

View 1 Replies View Related

General :: Bash - Use A Graphical Or Text Based EDITOR On Logging In Locally Or Remotely?

Aug 17, 2010

I can set my EDITOR variable in my .bashrc to e.g. gedit, which is a nice graphical editor on ubuntu. But when I log in over PuTTY that editor will fail.What is the best way to detect if I'm logged in and can run a graphical editor, or not, and set EDITOR appropriately?

View 2 Replies View Related

Ubuntu Installation :: Localhost Not Opening Php Files Text Editor?

Jun 17, 2011

localhost not opening php files text editor

View 1 Replies View Related

Programming :: Run Small Shell Script - Bash - Syntax Error Near Unexpected Token `('

Jul 9, 2010

I was trying to run small shell script, but could not run. I got the error like in subject.

This is exact way i was trying to do.

View 6 Replies View Related

General :: SUSE 10 Syslog-ng Syntax - Bash: Syntax Error Near Unexpected Token "("

Apr 20, 2011

I am a Novell (now defunct) CNE tring to learn Linux and am having a lot of trouble finding out where the WB 6-6 is wrong in the syntax for adding local4... the the syslog-ng config file. In the instructions there are discrepancies between commas and simi-comma, they are both in the statements in no particular order. there is no pattern to them. Here is what the book shows:

filter f_local4debug { level(debug) and facility(local4); };

When I try to input this in the Gnome terminal window to try and find out where it goes wrong I get the following: -bash: syntax error near unexpected token "(" If I can get the correct syntax I belive I can use the info to get past the rest of this portion of the lesson. I am desperate to learn Linux as the only jobs out there for a Novell CNE are migrations to MS, which really sucks, since MS really really sucks.

View 1 Replies View Related

General :: Configuration File For Vi Or Vim Editor For Syntax Highlighting?

Sep 10, 2010

On this Red Hat Box that I am using there is no .vimrc file for the user root. So, I created one and entered only one line to highlight syntax with colors when I am writing scripts in PHP and Bash. But it is not working.

Code:
[root@localhost ~]# cat ~/.vimrc
syntax on

[code]....

View 6 Replies View Related

General :: All Text In Text Editor Turned To Boxes?

Jul 17, 2009

I was trying to install GTK+-2.8.20, so I installed it's necessary dependencies in this order:

pkg-config-0.23
glib-2.20.4
pango-1.24.4
jpeg library
tiff library
cairo

And I was about to install the last dependency: ATK (Accessability Toolkit).I opened the Archive Manager to extract the "atk-1.26.0.tar.gz" file (yes, I'm still switching from Windows so I'm fond of GUI), but I noticed all the text in that window was boxes, like the □ type box for every letter of text.So instead I thought it wouldn't be a big deal, because the terminal and regular windows weren't screwed up.I opened a text file in gedit (reference to commands in terminal, such as how to extract files via terminal), but yet again all of the text was □-like boxes.

View 2 Replies View Related

Ubuntu :: Text Editor Column Editor And Regex Search/replace, Incrementing Number Insert?

Jul 25, 2011

On windows I really only used Notepad++ as my text editor, it had two features that I loved.What I need to accomplish is what I would do with Notepad++ column editor.I could have like 100 lines, and place the cursor at a column, and goto edit>column editor, and I could insert an incrementing number. (I could also pad the incrementing number with 0s, this was GREAT for making batch files among other things.)So each line at that column had a number higher than the previous line.The other feature that I used sometimes was a search/replace with regex patterns.Does anyone know of an editor that has those features for linux? I am mostly after the column editor insert feature but if you know of one with both features that would rock.

View 1 Replies View Related

General :: Syntax Error In Shell Script While Using If Condition?

May 28, 2011

I am writing a simple shell script where it checks the condition using if condition.

Code:
if [ $name == "JOHN" ] then admin='YES'; fi
if I use like this I am getting below error

[code]....

View 1 Replies View Related

General :: CLI RTF Text Editor?

Jan 14, 2011

I am really trying to find a cli/console text editor that can open/edit RTF text files? I know they them for Dindows, but what about Linux?

View 1 Replies View Related

General :: Text Editor For Windows ?

Jun 1, 2010

Recommend a good Linux text editor for Windows (if it exists), I wrote scripts for C-Shell using txt editor of windows but I have problem, it doesn't run because windows is not UNIX, what can I do? I don't want to install linux for a few scripts, I do testing of my scripts via unix server (this server is not mine), I treed dos2unix command, also doesn't work.

View 5 Replies View Related

General :: Why VI Editor Highlighting All Text

Mar 31, 2011

All of a sudden all the text in my vi editor is highlighted. I have no idea how this happened.

View 2 Replies View Related

General :: Emacs Is How Much More Than Text Editor?

May 30, 2011

I was reading how you could browse the net with Emacs but then it was stated that it was done with another application like Firefox so this would imply that Emacs is an interpreter would it not? What is Emacs capable of? Is it an interpreter that runs a text editor?

View 11 Replies View Related

General :: How To Use Default Text Editor

Jan 25, 2011

Code:export EDITOR="nano" in ".zshrc". How do I use default text editor now?

View 1 Replies View Related

General :: Text Editor Vs Notepad

Mar 24, 2010

re: lock file on an access database.i can see an .ldb file fine with windows notepad but cannot see the .ldb file in ubuntu's text editor. Its just messy text of symbols and letter. is there a way to view these files from ubuntu ?

View 13 Replies View Related

General :: Bash Script Syntax Fail As Root?

Apr 12, 2011

I'm scratching my head over a very simple netcat-based heartbeat monitoring script i wrote.

here we go:
Code:
echo `date --utc "+%Y-%m-%d %H:%M:%SZ"` script started

[code]...

View 6 Replies View Related

General :: Bash - Syntax Error Near Unexpected Token `('

May 2, 2010

I am trying to install vlc media player on my backtrack3 but when i am giving a command xvjf to extract bz2 file then

bash: syntax error near unexpected token `('

View 1 Replies View Related

General :: Shell Script Editor With Ssh Capability ?

May 11, 2011

In my rather unsuccessful attempt to get gvim working properly (see [url] )

I am now considering using some other editor in windows which will allow editing of ssh shell script *on the linux server* directly.

At the moment I'm using winscp's editor which is no better than notepad really (no syntax colouring / code folding / colour settings)

View 2 Replies View Related

General :: How To Change The Default Text Editor

Jul 28, 2010

How can I change the default text editor for console programs in Ubuntu.When I run mutt and send a message, it currently loads up Joe and I would prefet to load Vim.I know I can change $EDITOR for me only, but would prefe to do it system wide.

View 2 Replies View Related

General :: OpenSuse Terminal Text Editor

Mar 26, 2010

please let me know what are the commands I have to use & how to save a "OpenSuse Terminal text editor" once we have updated the file.

View 8 Replies View Related

General :: (small) Bash Script - Catching Syntax Errors

Sep 9, 2010

I've been trying to find a bug in this test script, but haven't been able to so far. I'm not lazy, I promise...just new to Bash so am having a hard time catching syntax errors. I call the script with the option -disableVenusBld, and it still prints "Starting build", which it shouldn't be doing right?

[Code]...

View 1 Replies View Related

General :: Script (Case & IF Statement Syntax) - Easy To Answer If Know Shell Scripting

May 6, 2011

Im a bit stuck with a simple script that im practicing with... im trying to get my head around some simple scripting. Basically i want to write a script that will work as below: It will ask the user to enter their userid. If its correct it will say 'Correct' If its the wrong id (But the ID exists in /etc/passwd) then it will say 'incorrect' If its not a valid userid it will say 'doesnt exist'. What i have so far is:

[Code]...

# If the user enters their own userid they will get a comment saying 'correct' $LOGNAME) echo "Correct";;

# If they enter another users ID (That exists in the /etc/passwd), then they get a message to say 'incorrect userid used'. Im not sure what i need to do here to get it to check the /etc/passwd to see if the input exists in there.... im guessing some kind of simple 'if' statement to say ---- "if 'input' exists in /etc/passwd then echo "incorrect userid used"

# If its entered incorrectly and not a valid ID then they will get this comment. Again, im guessing this part would be similar to te above option..... *) echo "not a valid ID";;

Ive managed to work out how the basic Case staements work, but to add a conditional statement based on the input, i just cant figure out. I have tried looking on google, and found some help but it doesnt really explain how i check the input against the /etc/passwd.

View 17 Replies View Related

Ubuntu :: Text Editor To Preserve Indentations On Wrapped Text?

Mar 21, 2010

I'm looking for a light-weight text editor for general-purpose composition that can preserve indentations on wrapped lines.

View 3 Replies View Related

Ubuntu :: Text Editor That Will Let Color Or Highlight Text On Demand?

May 11, 2010

Is there a simple text editor for Linux that will let you color or highlight text on demand? Something like gedit or leafpad with color? I know I can probably do this with vi or emacs, but I'm looking for something simple, need not be feature rich.

View 4 Replies View Related

General :: Insert Character Code Into Text Editor?

Aug 11, 2010

I need a lightweight GUI text editor on my Ubuntu Lucid system which lets me specify a Unicode code point (e.g. U+1234), and inserts that character to a UTF-8 text document. I know that gedit can't do it (not even with the Character Map plugin).

I'm not interested in solutions involving any kind of emacs or vi. I'm also not interested in text editors running in the terminal (such as joe, which has this functionality). I need the absolute simplest, smallest and fastest plain text editor for Linux which lets me type a few letters, insert a few characters by their code, type some more letters, and then save the .txt file as UTF-8-encoded.

View 1 Replies View Related

General :: Transparent Background In Editor But Solid Text?

Jan 26, 2011

Is there a way to make the background to an editor e.g. gedit transparent without affecting text's transparency? Is there any other program that supports this?

View 1 Replies View Related

General :: Copy/Paste From Nano To An Outside Text Editor?

Mar 27, 2011

I am trying to copy paste from a file in Nano to a text editor outside of nano on my machine (I am running windows using Nano through Putty) and I cannot figure out how to do it. I can select with mouse support enabled everything that I want to in Nano and I can cut it, but when I try to copy into my other text editor, it does not work.

View 4 Replies View Related

General :: Windows - Text / Log Editor With Auto-refresh Support

Feb 8, 2010

I'm looking for a text editor / log manager of some kind that will automatically refresh a file's contents when it changes.

I have a single target log file (e.g. current.log) that is overwritten under certain circumstances and I'd like to be able to leave it displayed and not constantly have to re-open the file to get updates. Much the same as 'tail --follow=name' does in Linux.

I'm using a Windows desktop but it's a remote file so a Linux app would work just as easily.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved