Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am to create a variable called LINUX_VERS that contains the first line of the file /var/log/dmesg. The file is to be regenerated each time machine boots (in which it is dynamically implemented). I know that the head-1 command lists files with first line. How do I input this into the .bashrc file? Also if you are being asked to create files in which the contents of the files are irrelevant, what does that mean? Thanks guys for helping me understand Linux.
Hey that's cool. Whatever works and yes all this is homework. The second part is creating the files: untitled file, **'s and ||'s, and >> README!! <<. The first part I need guidance too...lol. Thanks I appreciate your help.
---------- Post added 04-19-11 at 07:48 PM ----------
whatever you can provide me with to help me is cool, don't have to do my homework but some good examples or something would help.
As for the file qn; consider that creating a file does not require you to put any content into it.
There's a cmd for that if you look at those links and or google around.
Can this command for the first part be an alternative? I just want to make sure that this would work in the .bashrc file. What I did was join the two commands (the second command I know would only work if the first command is successful) like so: VAR="$VAR{LINUX_VERS}";head -1 /var/log/dmesg. Would this be a solution to regenerating the /var/log/dmesg so the variable LINUX_VERS is set dynamically when machine is booted? And if I do not get it right could someone let me know? I just do not want to clobber or screw up the ~/.bashrc file. Thanks guys and thanks for the links.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.