Quote (Minkomonster @ 21 Mar 2014 21:40)
To check if a file exists you can do
Code
if[ -e "$FileName" ];
then #file found
else #file not found
fi
To display the contents of a file with line numbers you can do
Code
cat -n $FileName
I am unsure what you mean by file access though. Perhaps I am jsut an idiot and am missing something simple though...
u can see it with " ls -l" I think and its what you can modidy with "chmod" what I mean with acess is user/group/other with read/write/execute
btw trying to do a do...while loop like c language but idk how
in C++ that would be :
Code
do
{
cout << "Choose between those 2 options:" <<endl;
cout << "1. Display file acces of a file" << endl;
cout << "2. Display content of a file" << endl;
cin >> choice;
}
while (choice != 1 && choice != 2 );
This post was edited by eric838 on Mar 21 2014 08:57pm