Sponsored Content
Full Discussion: how to change Editor in perl
Top Forums Programming how to change Editor in perl Post 302425638 by usustarr on Friday 28th of May 2010 06:13:36 PM
Old 05-28-2010
how to change Editor in perl

i have following code that runs fine on my Ubuntu workstation. However when i run this on a HPUX it wont open the text file i am trying to open for editing. I figured i just have to change gvim editor to vi, but that didnt work out well. Can some one help me out here? This is written in Perl


Code:
my $unameInfo = `uname -a | grep -i linux`;
chomp $unameInfo;
$unameInfo = lc $unameInfo;
my $nonLinux = 0;
if ( $unameInfo !~ /linux/ )
{
  $nonLinux = 1;
}

my $STATIONGUI_EDITOR = '/usr/bin/gvim';
#my $STATIONGUI_EDITOR = '/usr/bin/vi';
if (defined $ENV{'STATIONGUI_EDITOR'} )
{
  $STATIONGUI_EDITOR = $ENV{'STATIONGUI_EDITOR'};
}
my $STATIONGUI_MULTI_EDITOR = undef;
if (defined $ENV{'STATIONGUI_MULTI_EDITOR'} )
{
  $STATIONGUI_MULTI_EDITOR = $ENV{'STATIONGUI_MULTI_EDITOR'};
}

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Change background color in VI editor

Hi, I am new to unix. How can i change the background color in vi? Thank you. -tictactoe (1 Reply)
Discussion started by: tictactoe
1 Replies

2. Shell Programming and Scripting

Hw to change the font of output in perl

Hw to change the font color and size of output in perl (2 Replies)
Discussion started by: trupti_rinku
2 Replies

3. UNIX for Advanced & Expert Users

perl colors in nedit editor

Hi, I would like to change the color of the nedit editor for perl scripts. I tried to find the .nedit file in my $HOME directory but didn't find it. Can anyone tell where can I find the .nedit file or where can I modify the color for perl scripts in the nedit editor ? Thanks in... (2 Replies)
Discussion started by: Alalush
2 Replies

4. Shell Programming and Scripting

set EDITOR=vi -> default editor not setting for cron tab

Hi All, I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by set EDITOR=vi it does not open a vi editor , rather it do as below..... ///////////////////////////////////////////////////// $ set... (6 Replies)
Discussion started by: aarora_98
6 Replies

5. Shell Programming and Scripting

change requires with perl

Hi, i need to change a file with perl having contents below, but it will not do any action if change is being already made. file.txt AAAAAA BBBBBB CCCCCC output.txt (that required) AAAAAA #BBBBB DDDDDD CCCCCC Thanks, (2 Replies)
Discussion started by: learnbash
2 Replies

6. Shell Programming and Scripting

how to change time hr:mm to mm:hr in perl

Hi I want to match time hr:mm and change to mm:hr please let me know how to do that in perl (2 Replies)
Discussion started by: lakshmikant
2 Replies

7. Shell Programming and Scripting

Change Directory in Perl

Hi Can any one please support: From Windows, I am running perl script located in C:/scripts directory and need to run a command "ls | sort | uniq" on the files in D:/temp directory. #!c:\perl\bin\perl.exe $file_dir="D:\\temp"; $command1="cd"; $command2="ls | sort | uniq";... (2 Replies)
Discussion started by: sureshcisco
2 Replies

8. Shell Programming and Scripting

Perl- Nested 'for' order change

Hello, I'm quite new to perl so my question is rather basic and I know there is probably a simple way around it but I can't seem to find it. I have a medium-length code and there is a part that works with a nested for loop: foreach my $j(@primpiddelta){ for (my $k=1;... (0 Replies)
Discussion started by: acsg
0 Replies

9. AIX

putty background colour change in vi editor

Hello, I have a problem with my putty session when i use the vi editor or when i do dbaccess on an Informix database. Suddenly the background and foreground colour of my terminal change and it makes it difficult for me to see whats on the screen. Why this is happening? Is there a way to keep... (2 Replies)
Discussion started by: omonoiatis9
2 Replies

10. Shell Programming and Scripting

Perl to change a value in a file

Hi, I have a file with the following line open (unit=2, file='t0_p0.DAT')I want to change the value of the above zeros with variables $i and $j using a simple perl one linear. I've tried the following but it doesn't work perl -i -pe "/open/&&s/t\d+_p\d+/t$j_p$i/" fileThanks! (3 Replies)
Discussion started by: lost.identity
3 Replies
LNEATO(1)						      General Commands Manual							 LNEATO(1)

NAME
lneato - A Customizable Graph Editor SYNOPSIS
lneato [ -V ] [ -lmmode ] [ -ellev ] [ file ] DESCRIPTION
lneato is a graph editor for the X Window System. It may be run as a standalone editor, or as a front end for applications that use graphs. It can control multiple windows viewing different graphs. lneato is written on top of neato and lefty. lefty is a general-purpose programmable editor for technical pictures. It has an interpre- tive programming language similar to AWK and C. The user interface and graph editing operations of lneato are written as lefty functions. Programmer-defined graph operations may be loaded as well. Graph layouts are made by neato, which runs as a separate process that communi- cates with lefty through pipes. If the input graph contains xdot attributes, lneato will use that to display the graph. Otherwise, it runs neato to obtain layout informa- tion. USAGE
The file name is optional. If present, the graph contained in that file is displayed in the lneato window. OPTIONS
-V Prints the version. -lmmode Sets the layout mode. The mode can be sync or async. The default is async. -ellev Sets the mesage level. The lev can be 0 or 1. The default is 0. SEE ALSO
neato(1), lefty(1), dotty(1), xdot(3), dotty user guide. LNEATO(1)
All times are GMT -4. The time now is 06:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy