Search Results

Search: Posts Made By: icelated
1,872
Posted By icelated
open files
I want to open a file and edit it using vi However, i dont want to open directories or binary files. how can i do this?

Right now it opens all files without caring


echo "please enter a file...
1,466
Posted By icelated
thank you mirni
thank you mirni
1,466
Posted By icelated
dont work
dont work
1,466
Posted By icelated
find a user on the system
i am prompting for a name to search.


read user
if [ grep "^$user" /etc/passwd ]
then

however, i get this error:


please enter a username on the system:
fool
menu_script2.sh: line...
2,449
Posted By icelated
how do i find out if the file is a valid file? i...
how do i find out if the file is a valid file? i dont want to open binary file or a directory.
2,449
Posted By icelated
I tried this but i keep getting "please enter a...
I tried this but i keep getting "please enter a real file extension"
how would i then create a valid file?



if [ -f " $file" ]
then
echo "A real file"

vi $file
else
echo "please enter...
2,449
Posted By icelated
open a file in vi
I am prompting a user to enter a file to open in vi and if the file exists and is a readable ordinary file, otherwise create that file. Also protect that so the user can not open in vi a binary file...
1,884
Posted By icelated
thank you dg
thank you dg
1,884
Posted By icelated
change directory if available
I have a simple shell script that prompts the user to enter a directory to navigate to.
What i want it to do and i don't know how to do this is if the directory is invalid automatically navigate to...
Showing results 1 to 9 of 9

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