Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Output from who command - quick riddle Post 302494255 by Corona688 on Sunday 6th of February 2011 01:25:46 PM
Old 02-06-2011
This is why I wanted to know the output of who. It's much harder to fix this after you process it than to get it right in the first place! But since you just plain won't, this hack might do:
Code:
who | grep s132a | cut -d' ' -f1,3,11,13,14 | while read A B C D
do
        echo -e "${A}\t${B}\t${C}\t${D}"
done

---------- Post updated at 12:25 PM ---------- Previous update was at 12:24 PM ----------

This might be a simpler way:

Code:
who | grep s132a | cut -d' ' -f1,3,11,13,14 --output-delimiter='\t'

which if it works, the parameter --output-delimiter='\t' could replace
Code:
cut ... | tr ' ' '\t'

in most places.

Last edited by Corona688; 02-06-2011 at 02:30 PM..
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Quick help with the date command...

I'm new to unix, and I was wondering how would you output the following date using the date command? Thank you in advance. November 4,2005 17:04:31 EST Wednesday (1 Reply)
Discussion started by: Newguy4
1 Replies

2. Shell Programming and Scripting

Riddle - solve it if you can

I don't understand this, can anyone explain the evaluation logic used here, and I would really appreciate a general explanation for it. ---------------------- Here's the korn script: -------------------- #! /usr/bin/ksh if ] then echo true else echo false fi if (( 2 > 10 )) then... (1 Reply)
Discussion started by: numstr
1 Replies

3. Shell Programming and Scripting

Quick Question on sed command in shell script

Hello, I have the following line in one of my shell scripts. It works fine when the search string($SERACH_STR) exists in the logfile($ALERTLOG) but if the search string does not exist this line errors out at run time. Is there a way to make this line return 0 if it is not able to find the... (4 Replies)
Discussion started by: luft
4 Replies

4. UNIX for Dummies Questions & Answers

Command display output on console and simultaneously save the command and its output

Hi folks, Please advise which command/command line shall I run; 1) to display the command and its output on console 2) simultaneous to save the command and its output on a file I tried tee command as follows; $ ps aux | grep mysql | tee /path/to/output.txt It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies

5. Shell Programming and Scripting

Ksh riddle: interpret variable two times?

exam is a ksh script. In command line I enter: exam 3 param_2 param_3 param_4. In exam how can I get the value of the parameter which position is specified by the first argument. Simply doing this DOES NOT work: offset=$1 value=$$offset can you figure out any possible way to interpret a... (5 Replies)
Discussion started by: i27oak
5 Replies

6. Red Hat

Command understanding the output file destination in case of standard output!!!!!

I ran the following command. cat abc.c > abc.c I got message the following message from command cat: cat: abc.c : input file is same as the output file How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies

7. UNIX for Dummies Questions & Answers

Quick UNIX command to display specific lines in the middle of a file from/to specific word

This could be a really dummy question. I have a log text file. What unix command to extract line from specific string to another specific string. Is it something similar to?: more +/"string" file_name Thanks (4 Replies)
Discussion started by: aku
4 Replies

8. Shell Programming and Scripting

Insert title as output of command to appended file if no output from command

I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place. What I need The following command is placed at the prompt: TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies
g_sigeps(1)					 GROMACS suite, VERSION 4.5.4-dev-20110404-bc5695c				       g_sigeps(1)

NAME
g_sigeps - convert c6/12 or c6/cn combinations to and from sigma/epsilon VERSION 4.5.4-dev-20110404-bc5695c SYNOPSIS
g_sigeps -o potje.xvg -[no]h -[no]version -nice int -[no]w -xvg enum -c6 real -cn real -pow int -sig real -eps real -A real -B real -C real -qi real -qj real -sigfac real DESCRIPTION
g_sigeps is a simple utility that converts C6/C12 or C6/Cn combinations to sigma and epsilon, or vice versa. It can also plot the poten- tial in file. In addition, it makes an approximation of a Buckingham potential to a Lennard-Jones potential. FILES
-o potje.xvg Output xvgr/xmgr file OTHER OPTIONS
-[no]hno Print help info and quit -[no]versionno Print version info and quit -nice int 0 Set the nicelevel -[no]wno View output .xvg, .xpm, .eps and .pdb files -xvg enum xmgrace xvg plot formatting: xmgrace, xmgr or none -c6 real 0.001 c6 -cn real 1e-06 constant for repulsion -pow int 12 power of the repulsion term -sig real 0.3 sig -eps real 1 eps -A real 100000 Buckingham A -B real 32 Buckingham B -C real 0.001 Buckingham C -qi real 0 qi -qj real 0 qj -sigfac real 0.7 Factor in front of sigma for starting the plot SEE ALSO
gromacs(7) More information about GROMACS is available at <http://www.gromacs.org/>. Mon 4 Apr 2011 g_sigeps(1)
All times are GMT -4. The time now is 09:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy