Sponsored Content
Full Discussion: uisng color in script...
Top Forums Shell Programming and Scripting uisng color in script... Post 56157 by moxxx68 on Tuesday 28th of September 2004 06:23:07 PM
Old 09-28-2004
Computer dear Zazzybob...

Smilie i don't want to sound a little wet behind the ears but there are certain things in linux I haven't got to yet.. and I don't know how to untar that script or download... or what I am supposed to do to make part of the system.. I know how to gunzip it but I am not sure of the rest..
also i tried
alias ls='ls -ali --color auto'
at the beginning of the script and no color.. in linux redhat 6.0 text mode i learned to implement
alias ls=`ls -ali --color' in the .bashrc file but this isn't working in the script...

here is the script;;;
# !/bin/sh
# .clear
alias ls='ls -ali --color=auto' /* new line */
function fun { clear; pwd; date; tty; }
TTY=`tty`
Dir=`dir`
echo "enter term:"
read term
if [ "$TTY" == "/dev/pts/$term" ]
then
fun
echo "Experimental Tterminal" > /dev/pts/$term
elif [ "$term" == "z" ]
then
fun
echo "Experimental Terminal"
ls -ali -R . | less > /dev/tty
elif [ "$term" == "usb" ]
then
fun
echo "//Usbterminal//" > /dev/tty
ls -ali
else
fun
case $term in
u|U) fun
echo "//usbterminal//" && egrep -nA5 '([a-z]|[0-9]\Smilie' * | less && ls -ali -R | less > /dev/tty
;;
e|E) fun
echo "Experimental Terminal" && egrep -nA5 '([a-z]|[0-9]\:])' * | less && ls -ali -R | less > /dev/tty
;;
a|A) fun
egrep -nA5 '([a-z]|[0-9])' * | less && ls -ali -R | less > /dev/tty
;;
x|X) fun
xterm & > /dev/tty
;;
m|M)fun
mozilla & > /dev/tty
;;
esac
fiSmilie
thanx moxxx68
 

3 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Find command uisng -prune or -only

I've run into a brick wall using the -prune command to avoid walking sub-directories. Does any one have any suggestions on how I avoid walking the sub-directories when finding files in the following example? I want to find all files older than 30 days in the dir1 directory and only the dir1... (7 Replies)
Discussion started by: 2reperry
7 Replies

2. AIX

How to backup and restore Linux uisng NIM.

Hi Friends, I've a hard question to ask. I have a NIM server running on AIX 5.3. Now my requirement is that , " From This NIM Server i would like to take the Image of Linux servers ". I mean that using NIM server i should be able to backup / restore the linux Servers. In Simple terms... (3 Replies)
Discussion started by: rdkumarj
3 Replies

3. UNIX for Dummies Questions & Answers

How to change the background color in the init 3 mode(not line color)

Hello, I am using RHEL 6.1 on VMware I am searching for a way to change background color (not line by line color wich one can using tput command) basically changing the color of the whole screen to white instead of the default black and changing font color to black and alos would like to... (2 Replies)
Discussion started by: Dexobox
2 Replies
ALI(1)                                                               [nmh-1.5]                                                              ALI(1)

NAME
ali - list mail aliases SYNOPSIS
ali [-alias aliasfile] [-list | -nolist] [-normalize | -nonormalize] [-user | -nouser] [-version] [-help] [aliases ...] DESCRIPTION
Ali searches the named mail alias files for each of the given aliases. It creates a list of addresses for those aliases, and writes that list on standard output. If no arguments are given, ali outputs all alias entries. By default, when an aliases expands to multiple addresses, the addresses are separated by commas and printed on as few lines as possible. If the -list option is specified, then when an address expands to multiple addresses, each address will appear on a separate line. The switch -user directs ali to perform its processing in an inverted fashion: instead of listing the addresses that each given alias expands to, ali will list the aliases that expand to each given address. If the -normalize switch is given, ali will try to track down the official hostname of the address. The files specified by the profile entry "Aliasfile" and any additional alias files given by the -alias aliasfile switch will be read. Each alias is processed as described in mh-alias(5). FILES
$HOME/.mh_profile The user profile /etc/passwd List of users /etc/group List of groups PROFILE COMPONENTS
Path: To determine the user's nmh directory Aliasfile: For a default alias file SEE ALSO
mh-alias(5) DEFAULTS
`aliasfiles' defaults to /etc/nmh/MailAliases `-nolist' `-nonormalize' `-nouser' CONTEXT
None BUGS
The -user option with -nonormalize is not entirely accurate, as it does not replace local nicknames for hosts with their official site names. MH.6.8 11 June 2012 ALI(1)
All times are GMT -4. The time now is 01:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy