Modify

Opened 7 years ago

Closed 7 years ago

Last modified 22 months ago

#5556 closed defect (worksforme)

Test or comparison "-n" not working in shell script

Reported by: Maddes <maddes_trac@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: Cc:

Description

The -n test/comparison is not working in OpenWrt.

Example:

[ -n ${var} ] && ...

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by Maddes <maddes_trac@…>

The correct syntax is: (notice the quotes)

[ -n "${var}" ] && ...

Thanks to Vasilis.

comment:2 Changed 7 years ago by jow

  • Resolution set to worksforme
  • Status changed from new to closed

comment:3 Changed 22 months ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.