Search Results

Search: Posts Made By: chish
7,390
Posted By chish
I changed to this: ... while [[ $# -gt 0...
I changed to this:

...
while [[ $# -gt 0 ]]
do
fullPath=$(grep -sc '/' $1)
echo $fullPath
if [[ $fullPath -gt 0 ]]; then
echo "Wrong, full path"
fi
shift
done
...


But it doesn't...
7,390
Posted By chish
while [[ $# -gt 0 ]] stays in the loop
Hi,

I have(ksh):


...
while [[ $# -gt 0 ]]
do
fullPath=$(grep -s '/' $1 | wc -l)
echo $fullPath
if [[ $fullPath -gt 0 ]]; then
fi
echo "Wrong, full path"
shift
done
...


I tried...
1,779
Posted By chish
Thank you it works and that's what I've expected.
Thank you it works and that's what I've expected.
1,779
Posted By chish
grep and counter
Hi,

I have such an example(ksh):


name1=Example
directory=/directory1/Example/directory2
match=$(grep -s '$name1' $directory | wc -l)
echo $match


But it replies to me:

0

What I...
26,995
Posted By chish
Thank you, that's exactly what I want, but what...
Thank you, that's exactly what I want, but what this in bash means?

=~

I am trying to search analog for KSH for it, because it reports that "=~" unexpected.
26,995
Posted By chish
ksh cut out words from string
Hi,

I have:

export string1=qwerWhatever
export string2=qwerWhatever1
export currdir=`pwd`


echo $currdir gives back:

/dir/dir/Whatever1

I want to take first 4 letters from string1...
Showing results 1 to 6 of 6

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