LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mount point (https://www.linuxquestions.org/questions/linux-newbie-8/mount-point-4175554501/)

handsome5217 09-25-2015 09:35 AM

mount point
 
Lastly for bonus points, rick was hoping to list the system's configured mount points:
rick@rickws:~$#cat /etc/fstab | egrep -v ^#' awk '{ print $7 }
===
what is the error on here can any one help me please

TB0ne 09-25-2015 09:42 AM

Quote:

Originally Posted by handsome5217 (Post 5425544)
Lastly for bonus points, rick was hoping to list the system's configured mount points:
rick@rickws:~$#cat /etc/fstab | egrep -v ^#' awk '{ print $7 }
===
what is the error on here can any one help me please

Why don't you ask Rick what his solution was?

Better...please read the LQ Rules about posting the same question more than once, and about posting verbatim homework questions. We'll HELP you, but you have to show effort of your own.

handsome5217 09-25-2015 09:59 AM

Quote:

Originally Posted by TB0ne (Post 5425552)
Why don't you ask Rick what his solution was?

Better...please read the LQ Rules about posting the same question more than once, and about posting verbatim homework questions. We'll HELP you, but you have to show effort of your own.

i have done my best but unfortunately i cant think what is wrong here its really confusing if u cant at lest give me a hint please

Habitual 09-25-2015 10:18 AM

Try
Code:

mount
or
Code:

df -h
IDK what is in ricks' /etc/fstab, but mine here does not have a 7th field, so
Code:

cat /etc/fstab | egrep -v ^#'  awk '{ print $7 }
is wrong, Wrong, WRONG, It's missing a pipe and a closing single tick on the awk.
cat <something> | grep <something> is wasting keystrokes.
Try
Code:

grep -v ^# /etc/fstab
and work out from there.

Let us know.

handsome5217 09-25-2015 10:26 AM

Quote:

Originally Posted by Habitual (Post 5425568)
Try
Code:

mount
or
Code:

df -h
IDK what is in ricks' /etc/fstab, but mine here does not have a 7th field, so
Code:

cat /etc/fstab | egrep -v ^#'  awk '{ print $7 }
is wrong, Wrong, WRONG, It's missing a pipe and a closing single tick on the awk.
cat <something> | grep <something> is wasting keystrokes.
Try
Code:

grep -v ^# /etc/fstab
and work out from there.

Let us know.

cat /etc/fstab awk '{ print $7 }'
this command thisplsy the mount points

suicidaleggroll 09-25-2015 12:39 PM

Quote:

Originally Posted by handsome5217 (Post 5425572)
cat /etc/fstab awk '{ print $7 }'
this command thisplsy the mount points

No it doesn't, it's wrong all over the place. For one you STILL don't have the pipe that Habitual mentioned, and two there is no seventh column in /etc/fstab (the mount point is the second column). Here is the output of your command (with the pipe added in where it's supposed to be) on my machine:
Code:

$ cat /etc/fstab | awk '{ print $7 }'



Nov

maintained
mount(8)

It's just pulling out the seventh word from some of the comment lines.

Habitual 09-25-2015 01:00 PM

Since you haven't shown you trying
Code:

grep -v ^# /etc/fstab
with some "| awk" (work out from there)
I am done.
Ask Rick.
His code sucks and you can tell him I said so.

Check out
Code:

man findmnt
End Transmission.


All times are GMT -5. The time now is 02:14 AM.