Search Results

Search: Posts Made By: katdaniel16
20,060
Posted By katdaniel16
i will correct myself: 'search' will have a...
i will correct myself:

'search' will have a null value and my code should be

if [[ "$search" = "" ]]
20,060
Posted By katdaniel16
i already added the closing back tick.. thanks..
i already added the closing back tick.. thanks..
20,060
Posted By katdaniel16
if the user didn't enter a parameter in the...
if the user didn't enter a parameter in the command line, the value of 'search' would just be blank spaces.. if i do this:

if [[ "$search" = " " ]]

it doesn't return a true value..
20,060
Posted By katdaniel16
it works now!!! yehey!!! thanks for the help... i...
it works now!!! yehey!!! thanks for the help... i need to to solve 2 more problems.. maybe i'm going to post questions again here.. thank you again!!
20,060
Posted By katdaniel16
i think i know where the problem is.. wait..
i think i know where the problem is.. wait..
20,060
Posted By katdaniel16
i already checked the value of the parameters...
i already checked the value of the parameters using "echo"..
20,060
Posted By katdaniel16
search="$@" date_files="`date -r "$i"" ...
search="$@"


date_files="`date -r "$i""

substring="${date_files:3:7}"

if [[ "$substring" = "$search" ]]



here's some parts of the code i'm working on..
this is how i initialized...
20,060
Posted By katdaniel16
what if the string for the variable search will...
what if the string for the variable search will come from the output of a command line? placing-double-quotes solution will not be applicable then...
20,060
Posted By katdaniel16
comparing 2 string variables in unix
search=Jul 22
date=Jul 22

if [ "$search" = "$date" ]
then
echo They match

>>this piece of code does not detect that search and date are equivalent strings.. what's wrong with it?
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 02:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy