The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Of bash and whitespace... lev_lafayette Shell Programming and Scripting 2 04-13-2008 09:44 PM
TAHI Test Suite 3.0.13 (IPv6 Conformance Test Tool branch) iBot Software Releases - RSS News 0 04-06-2008 01:20 PM
sed : remove whitespace b.hamilton Shell Programming and Scripting 3 11-06-2007 11:02 AM
Keithley Introduces Linux-Based RF Parametric Test Systems - Test and Measurement.com iBot UNIX and Linux RSS News 0 07-23-2007 11:30 AM
trim whitespace? msteudel Shell Programming and Scripting 4 07-07-2005 08:57 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-25-2003
bensky bensky is offline
Registered User
  
 

Join Date: Feb 2002
Posts: 23
remove whitespace and test

Hi,

I know removing whitespaces I can found so many threads to read how it works and i did it, but my problem isn't solved...

I have in my script a variable $1 which can contains a text like " Channel ".

No I want to check if $1 contains the word Channel, but I don't know how many whitespaces there are before and after the word...

I tried this:

if [ "Channel" = $1|awk '{print $1}'>$1 ] ; then
echo "found!!!"
fi

So where is the problem??
Sorry for this stupid question

Ben Sky
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:40 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0