Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: Makaveli.2003
19,543
Posted By Makaveli.2003
diannakretz r u tryin to do exactly the same...
diannakretz r u tryin to do exactly the same thing? Convert a file names access rights so they are shown in numeric form??

If so...try this

ls -l menu | cut -c2-10 | tr '\-rwx' 0421 | sed...
6,605
Posted By Makaveli.2003
It is not possible to have all three on 1...
It is not possible to have all three on 1 machine, Linux is a clone of Unix, the arch is a little more modern in Linux but achieves a similar objective in usability. The big Unix vendors still tend...
2,618
Posted By Makaveli.2003
Copy error message....
When the promt "Enter file name to be copied" comes up press enter (return), I get an error message, is there a new of getting rid of it or round it??


Copyfile () {
print -n "Enter file name to...
2,618
Posted By Makaveli.2003
print -n "Enter file name to be deleted: " read...
print -n "Enter file name to be deleted: "
read name
if [ -f $name ]
then
rm $name
echo "file: $name has been deleted"
else
echo "this is not a file"
fi

This is the error message: usage:...
2,618
Posted By Makaveli.2003
How do I....
I got this script:

print -n "Enter file name: "
read name
....
.....
.....
etc

but at the prmpt, when I press enter (without typin a word), comes up with sum error message, is there away...
22,808
Posted By Makaveli.2003
Override protection.....
I am having this problem......when I run this script:

print -n "Enter file name to be deleted: "
read answer
if [ -f $name ]
then
rm $name
else
echo "No such file with the name: $name...
10,247
Posted By Makaveli.2003
These are the changes I made, are the case...
These are the changes I made, are the case statements in the right place?? Still is not functioning, can u tell me nething else im doing wrong??

amenu () {
clear
echo "\t\t\tMy Personal Menu" ...
10,247
Posted By Makaveli.2003
I tried a few things with my script Jimbo but Im...
I tried a few things with my script Jimbo but Im not getting any where, Jimbo please check ur private messages, and post ur reply??
10,247
Posted By Makaveli.2003
Jimbo, I tried ur script but it didnt have any...
Jimbo, I tried ur script but it didnt have any sub menu's, well I altered my script and displays as I hoped it would, but when i get the sub menu's up (select options 2 or 3, on first menu displayed)...
10,247
Posted By Makaveli.2003
THIS IS WHAT IVE TRIED BUT IT DIDNT WORK, CAN NE1...
THIS IS WHAT IVE TRIED BUT IT DIDNT WORK, CAN NE1 HELP!!?? IVE HIGHLIGHTED THE BITS WHERE I MIGHT B GOIN WRONG IN RED, CAN NE SPOT NE MISTAKES?? THX IN ADVANCE 4 NE HELP

amenu () {

clear ...
10,247
Posted By Makaveli.2003
Ok, Jimbo I tried this, but didnt work, can u see...
Ok, Jimbo I tried this, but didnt work, can u see ne errors or mistakes?

Also, after I got to a sub menu how do I get it to return to a the main menu, I left that part blank??

amenu () {
...
10,247
Posted By Makaveli.2003
This is my menu script so far: !/bin/ksh ...
This is my menu script so far:
!/bin/ksh

amenu () {

clear
echo `date`
echo
echo "\t\t\tMy Personal Menu"
echo
echo "\t\tPlease Select:"
echo
echo "\t\t\t 1. Directory display"...
10,247
Posted By Makaveli.2003
;) ;)
;) ;)
10,247
Posted By Makaveli.2003
I have designed a script menu, but I would like...
I have designed a script menu, but I would like to to create sub menus e.g. I have my normal menu, then have a few options, and I for example choose option 2 and I would like it to take me to a whole...
10,247
Posted By Makaveli.2003
Jimbo thats just a typin error from when I was...
Jimbo thats just a typin error from when I was copyin it, i didnt do that on my script in unix ;) Do u know what I can add to MY code in order for it to function with sub menu's? :confused:
10,247
Posted By Makaveli.2003
Thanx Jimbo, must have posted at the same time,...
Thanx Jimbo, must have posted at the same time, coz I didnt see ur example at first, thanx for that. I tried it and it worked, but I rather use my existing script, how can I alter that so that it...
10,247
Posted By Makaveli.2003
This is my menu script so far: !/bin/ksh ...
This is my menu script so far:
!/bin/ksh

amenu () {

clear
echo `date`
echo
echo "\t\t\tMy Personal Menu"
echo
echo "\t\tPlease Select:"
echo
echo "\t\t\t 1. Directory display"
echo...
10,247
Posted By Makaveli.2003
I know how to do a standard clear, but not sure...
I know how to do a standard clear, but not sure how to do a enter/add the sub menu part of the display in my existing script.

Can you give me an example of a menu which displays sub menu's??
10,247
Posted By Makaveli.2003
Sub menu's
I have designed a script menu, but I would like to to create sub menus e.g. I have my normal menu, then have a few options, and I for example choose option 2 and I would like it to take me to a whole...
19,543
Posted By Makaveli.2003
Yep, Jimbo worked a treat. I just want to...
Yep, Jimbo worked a treat.

I just want to thank every1 that has helped: Jimbo, negative, shaik786, sbw1, guest100, Perderabo, davidl, and LivinFree thanx alot :) :) :) :)

Especially want to...
19,543
Posted By Makaveli.2003
ls -l menu | cut -c2-10 | tr '\-rwx' 0421 | sed...
ls -l menu | cut -c2-10 | tr '\-rwx' 0421 | sed "s/./& /g" | awk '{print $1+$2+$3 $4+$5+$6 $7+$8+$9}'
produces: 7

got it to work, think it was coz i didnt put the space between the "&" and the...
19,543
Posted By Makaveli.2003
Ok, lets clear a few things up. Thx...
Ok, lets clear a few things up. Thx davidl......heres the test results :)

echo abcdef | sed -e "s/c/X/" <--should yield--> abXdef
that worked, it printed abXdef, like u said :)
...
19,543
Posted By Makaveli.2003
Sorry Jimbo, didn't work - these are my results: ...
Sorry Jimbo, didn't work - these are my results:

echo abcdef | /usr/xpg4/bin/sed -e "s/c/X/"
it just printed the file name that i entered after echo e.g. abcdef


ls -ld somefilename |
cut...
19,543
Posted By Makaveli.2003
I did: echo menu | /usr/xpg4/bin/sed -e...
I did:

echo menu | /usr/xpg4/bin/sed -e "s/c/X/"

and the outcome was:

menu (just printed the file name is this the right outcome??)


Any other pointers Jimbo?? We're so close...
19,543
Posted By Makaveli.2003
davidl tried wat u said, but didn't seem to work,...
davidl tried wat u said, but didn't seem to work, don't know why.

Your idea seems a bit complex compared with Jimbo's, its definatly something to do with the sed command
sed "s/./& /g" ...
Showing results 1 to 25 of 45

 

Featured Tech Videos

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