LinuxLinks.com
Newbies What Next ? News Forums Calendar

Search/Browse

 Category Gateway
More Options
Category:

LinuxLinks News
 · Improve Your Mental Mettle with These Open Source Puzzle Games
 · MOOS Project Viewer 3.2 Support for Microsoft Project 2016 Files
 · Shuffle the Decks with These Ace Open Source Card Games
 · Have a Blast with Fun to Play Open Source Arcade Style Games
 · Asus Tinker Board TinkerOS_Debian V2.0.1 (Beta version)
 · Asus Tinker Board TinkerOS Android 13.11.0.5 Anything Special?
 · Fun to Play Open Source Turn-Based Strategy Games
 · Fun to Play Open Source Real-Time Strategy Games Fight for Glory
 · Grasp PL/SQL/pgSQL Programming with Free Books
 · Fun to Play Open Source First-Person Shooter Games
(more...)
 

LinuxLinks Login

Login:

Password:



Click here
to start your own
Link collection!


Click to Visit

My LinuxLinks
 My LinuxLinksMyLinks  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help with Homework...I don't understand this stuff.

 
Post new topic   Reply to topic    LinuxLinks.com Forum Index -> Beginners
View previous topic :: View next topic  
Author Message
Rmurphy461
Registered


Joined: 03 Oct 2011
Posts: 2

PostPosted: Mon Oct 03, 2011 9:47 pm    Post subject: Help with Homework...I don't understand this stuff. Reply with quote

Here is the assignment, I need direction. I don't understand.

In same folder as last week, create a new file called week3prog1[name].scr

change the permissions on this new file to add the execute bit for user, group and owner.

Edit your file using Gedit or VI and change it so it performs the following actions:

display the date
display the words Hello World
display information about users that are currently logged in
Note. Remember to include #!/bin/bash as the first line of your script.

Save the file and type your file name to execute.


Code:

[Student@localhost ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/NX/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin
[Student@localhost ~]$ PATH=$PATH:/home/POS420/rebecca/myprog/week3prog1linuxscript1.scr
[Student@localhost ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/NX/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/POS420/rebecca/myprog/week3prog1linuxscript1.scr
[Student@localhost ~]$ chmod ugo+x week3prog1rebecca.scr
chmod: cannot access `week3prog1rebecca.scr': No such file or directory
[Student@localhost ~]$ chmod ugo+x week3proglinuxscript1.scr
chmod: cannot access `week3proglinuxscript1.scr': No such file or directory
[Student@localhost ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/NX/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/POS420/rebecca/myprog/week3prog1linuxscript1.scr
[Student@localhost ~]$ chmod ugo+x week3proglinuxscript1.scr
chmod: cannot access `week3proglinuxscript1.scr': No such file or directory
[Student@localhost ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/NX/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/POS420/rebecca/myprog/week3prog1linuxscript1.scr
[Student@localhost ~]$ PATH=$PATH:/student's home/myfiles/POS420/rebecca/myprog
> week3proglinuxscript1.scr
> cr week3proglinuxscript1.scr
> quit
> exit
> abort
>
[Student@localhost ~]$
[Student@localhost ~]$
[Student@localhost ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/NX/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/POS420/rebecca/myprog/week3prog1linuxscript1.scr
[Student@localhost ~]$ gedit week3proglinuxscript1.scr
[Student@localhost ~]$ gedit week3prog1rebeccascript1.scr
[Student@localhost ~]$ week3prog1rebeccascript1
bash: week3prog1rebeccascript1: command not found
[Student@localhost ~]$ week3prog1rebeccascript1.scr
bash: week3prog1rebeccascript1.scr: command not found
[Student@localhost ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/NX/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/POS420/rebecca/myprog/week3prog1linuxscript1.scr
[Student@localhost ~]$ cd..
bash: cd..: command not found
[Student@localhost ~]$ cd
[Student@localhost ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/NX/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/Student/bin:/usr/NX/bin:/home/POS420/rebecca/myprog/week3prog1linuxscript1.scr
[Student@localhost ~]$ run week3progr1rebeccascript1.scr
bash: run: command not found
[Student@localhost ~]$ execute week3prog1rebeccascript1.scr
bash: execute: command not found
[Student@localhost ~]$ open week3prog1rebeccascript1.scr
Couldnt get a file descriptor referring to the console
[Student@localhost ~]$ open week3prog1rebeccascript1
Couldnt get a file descriptor referring to the console
[Student@localhost ~]$
Back to top
View user's profile Send private message

Display posts from previous:   
Post new topic   Reply to topic    LinuxLinks.com Forum Index -> Beginners All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2002 phpBB Group
Built with GeekLog and phpBB
Comments to the webmaster are welcome
Copyright 2009 LinuxLinks.com - All rights reserved