You are not logged in.

#1 2013-03-09 16:34:38

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Need some help converting a csh script to work in bash

In the expression below, what is the bash equivalent that $?TERM condition? 

if ( $?TERM == 1) then
...
endif

... googling on $?TERM is impossible by the way!


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2013-03-09 16:45:46

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Need some help converting a csh script to work in bash

if [[ $TERM ]]; then
...
fi

which is the same as [[ -n "$TERM" ]]

Last edited by Procyon (2013-03-10 08:05:43)

Offline

Board footer

Powered by FluxBB