trivial question about script
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi friends...
How do I can output each fiel below other in his column? I mean; when use
somethin like: "cat /etc/fstab | awk '{print $1"\t\t\t"$2"\t\t\t"$3}'" y recieve this output:
- ----real output -------------
LABEL=/ / ext3
LABEL=/boot /boot ext3
none /dev/pts devpts none /proc proc none /dev/shm tmpfs /dev/hda5 swap swap /dev/cdrom /mnt/cdrom iso9660 /dev/cdrom1 /mnt/cdrom1 iso9660 /dev/fd0 /mnt/floppy auto
- -----end ------------------------------------
But I hope to receive like this:
- ---desired output ------------------
LABEL=/ / ext3
LABEL=/boot /boot ext3
none /dev/pts devpts none /proc proc none /dev/shm tmpfs
/dev/hda5 swap swap/dev/cdrom /mnt/cdrom iso9660/dev/cdrom1 /mnt/cdrom1 iso9660/dev/fd0 /mnt/floppy auto
- --
Linux User Registered #232544
my GnuPG-key at www.keyserver.net
--- rm -rf /bin/laden ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+RjxxG3Fqyap52TERAmzoAJ9RN/1azFmLKOLseWCKwpNxRFRR7ACgk5Ng c6zSQi6FYhCYVD8gnLaOf40=
=TNbP
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 19 lines · ramzez
Hi friends...
How do I can output each fiel below other in his column? I mean; when use
somethin like: "cat/etc/fstab| awk '{print $1"\t\t\t"$2"\t\t\t"$3}'" y recieve this output:
- ----real output -------------
LABEL=/ / ext3
LABEL=/boot /boot ext3none /dev/pts devpts none /proc proc none /dev/shm tmpfs /dev/hda5 swap swap /dev/cdrom /mnt/cdrom iso9660 /dev/cdrom1 /mnt/cdrom1 iso9660 /dev/fd0 /mnt/floppy auto- -----end ------------------------------------
But I hope to receive like this:
- ---desired output ------------------
LABEL=/ / ext3
LABEL=/boot /boot ext3
Quoted 7 lines
none /dev/pts devpts none /proc proc none /dev/shm tmpfs
/dev/hda5swap swap/dev/cdrom/mnt/cdromiso9660/dev/cdrom1/mnt/cdrom1iso9660/dev/fd0/mnt/floppyauto
Does the following work, does here.
cat /etc/fstab | awk '{print $1"\t"$2"\t"$3}'
If not it must be due to tabs in the file itself.
Signature · 9 lines
Regards Richard [email protected] http://people.zeelandnet.nl/pa3gcu/ - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs