Search Results

Search: Posts Made By: Manueldo
2,865
Posted By Manueldo
Thank you. I found out whats wrong. thanks.
Thank you. I found out whats wrong. thanks.
1,425
Posted By Manueldo
juice apple table sofa // found my word it is...
juice apple table sofa // found my word it is sofa.Next step I need to find

sofa orange cuptea // this line, because it has SOFA, the same element ifound
pose glasses // in first line
1,425
Posted By Manueldo
How to get a third line in shell??
In my script I was working with the first line's elements. After That I need to find lines which start with element of first line.

file=$1
target=$2
while read line
do
if [ "$line" != "" ]
...
2,865
Posted By Manueldo
He is asking Syntax error: "else" unexpected...
He is asking Syntax error: "else" unexpected (expecting "then")
4,210
Posted By Manueldo
Thank you so much :b::D:)
Thank you so much :b::D:)
4,210
Posted By Manueldo
It doesnt change. I guess smth is wrong in my...
It doesnt change. I guess smth is wrong in my script ;(

for i in $3 $4 $5 $6
do
if [ " $1 " -nt " $i " ]


then
echo "$1 is newer than $i"
else
echo "$i is not older than $1"
fi
2,865
Posted By Manueldo
By echo wanted to check...Does not work still... ...
By echo wanted to check...Does not work still...
#!/bin/sh
if [ "$#" -eq 1 ] then
target=$1
echo $target

else makefile='$1'
target=$2
echo $makefile
$target

fi
exit 0
4,210
Posted By Manueldo
./mymk: 18: ./mymk: [avgs.txt -nt i]: not found ...
./mymk: 18: ./mymk: [avgs.txt -nt i]: not found
first.txt is not older than avgs.txt
./mymk: 18: ./mymk: [avgs.txt -nt i]: not found
second.txt is not older than avgs.txt
./mymk: 18: ./mymk:...
2,865
Posted By Manueldo
How to check arguments in shell???
for example I have
make [file] target
file is optional. So can I check whether there is [file] or no? I tried

if test $# -eq 1
then
path=$1
else path=$2
fi
But it doesnt work properlu ;(...
4,210
Posted By Manueldo
I did change, but it still doesn work. I modofied...
I did change, but it still doesn work. I modofied files, but still the same MESSAGE "file is not older other file":rolleyes:
4,210
Posted By Manueldo
If condition to check one file newer than the other
Dear All,

I'm new to unix scripting. I'm trying to write an utility script which has to check if one file is newer than another one. $3 $4 $5 $6 are files .txt. Help me please.

for i in $3 $4...
1,093
Posted By Manueldo
#!/bin/sh It does not work. It gives me only...
#!/bin/sh
It does not work. It gives me only NO. $3 $4$5$6 my files
file=$1
target=$2
while read line
do
if [ "$line" != "" ]
then
set $line
if [ "$1" = "$target" ]
then
...
1,093
Posted By Manueldo
NEWER...with IF test ...I guess yes.....
NEWER...with IF test ...I guess yes.....
1,093
Posted By Manueldo
Date of file
I need to check whether my file is up to date or no...Can you tell me command in shell which helps to do it??? With example please.
1,031
Posted By Manueldo
Checking commandline
mymk [-f file] target
How to check is [-f file] on commandline or no?
Cannot to find out ;(
Know that I need to use if.....new in shell sorry


Please use code tags...
1,415
Posted By Manueldo
I meant in command line I type MATCH APPLE :D...
I meant in command line I type MATCH APPLE :D sorry....

---------- Post updated at 04:22 PM ---------- Previous update was at 04:17 PM ----------

thank you so much for helping me :)
1,415
Posted By Manueldo
Yes, I have changed but it gives me wrong things....
Yes, I have changed but it gives me wrong things.
./match: line 5: [apple=apple]: command not found
./match: line 5: [table=apple]: command not found
./match: line 5: [home=apple]: command not...
1,415
Posted By Manueldo
LINES in shell programming
my script.
My program is called match. Also file 1.txt contains
apple orange juice
table chair cup

#!/bin/sh
program=$1
while read a b
do
if ["$a"="$program"]
then
echo a
fi
done<1.txt...
1,295
Posted By Manueldo
If you do not mind can explain why a b? what does...
If you do not mind can explain why a b? what does it mean???? sorry, i am new in shell....P.S. it works btw, I just want to understand. Thank you for helping
1,295
Posted By Manueldo
when I run this #!/bin/sh for line in `cat...
when I run this
#!/bin/sh
for line in `cat 1.txt`
do
#echo "$line"
echo awk `{print $1}` < 1.txt
done
it gives me
apple
orange
juice
table
etc.

But I need only
apple
table ...
1,295
Posted By Manueldo
LINES and FIRST WORDS of THOSE LINES
Hi everyone! I need your help. Can not find out what I am doing wrong :(

I have a file 1.txt. It looks like

apple orange juice
table computer banana
tea weather home
bed water mandarin

So...
Showing results 1 to 21 of 21

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