Hello everyone, I'm new to using Linux and i am trying to create a script that will produce a list of all the files of the present working directory. So far I only have this
Since the shell expands wildcards, that is all you need.
You changed directory (to the root directory), which meant that anything you did later applied only to that directory (unless you did another cd later). Since you want to list files in "present working directory", there is no sense to changing directory.
ok so i screwed up on my quest of fame. my orginal intentions were to do the following:
Create a script that will produce a text file that has a list of the files in the present working directory. Ensuring that I use the proper syntax to allow auto-execution from the command prompt. So far I have all is the first script that I orginally had. If I wanted to place internal comments I will have to do this line first right?
###comment place here (I am going to use my name and maybe a script title, explaining what this script was intended to do and such)