Search Results

Search: Posts Made By: relyveld
3,098
Posted By relyveld
I often use the double [[ ]] to get the ksh...
I often use the double [[ ]] to get the ksh internal tests.
if [[ -f $File ]]
then
print "yes"
else
print "no"
fi

You could use -L to test links, or -n just to see if $File is set.
a...
62,890
Posted By relyveld
Try ls -t $searchstring | head -n 1 | read...
Try
ls -t $searchstring | head -n 1 | read fileyouwant

or
fileyouwant=$(ls -t $searchstring | head -n 1)

I am using ksh.

If you create a script around it, use the normal #!/bin/ksh first...
12,117
Posted By relyveld
I often reload the .profile by (ksh syntax): ...
I often reload the .profile by (ksh syntax):

. $HOME/.profile

This is done with some other shells by:

source $HOME/.profile

You might need a different path.

Greetings, William.
1,561
Posted By relyveld
for file in `ls corre*` can be replaced by: for...
for file in `ls corre*` can be replaced by:
for file in corre*

Greetings, William.
3,423
Posted By relyveld
Thanks for the replies, Perderabo and R2007. ...
Thanks for the replies, Perderabo and R2007.

Perderabo, what is strange is that when I start a different terminal, or
a different shell, they all behave the same. I tried bash, tcsh, csh and sh....
3,423
Posted By relyveld
read after pipe problem OSX10.4
I use read often in scripts to filter the right part into a variable like:

$ print "abc cde efg" | read k l ; print "k=$k, l=$l"
k=, l=

This works on linux and unix versions I work with....
Showing results 1 to 6 of 6

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