On Jul 11, 2013, at 6:19 PM, Fbsd8 wrote: > In a .sh script I'm trying to get the jid for a single jail using this code > > jid=`jls -j jailname | cut -f 1- | awk '{print $1}'` >
Looks a little over complicated... why not just.. jls -j jailname jid -- Devin > The first line output by jls is a title line which the cut command is suppose > to cut out so the first field on line 2 gets selected by the awk command. > This is not working as I want, I get the first field of the title line. > > Is the cut command the correct command to us here? > > This is what the jls command shows > # /root >jls -j dir2 > JID IP Address Hostname Path > 15 10.0.10.24 dir2 /usr/jails/dir2 > > I am after the number 15 > > Thanks in advance > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"