Hi All,
I am hoping someone can help me with some scripting I need to complete using AWK.
I'm trying to process multiple fixed files to generate one concatenated fixed file in a standard format.
The Input file is:-
aaaa bbbbb ccccc 1 xxxx aaa bbb
aaaa bbbbb ccccc 2 abcd aaa CCC... (9 Replies)
Hi All,
I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file.
Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
HI,
I have a file serverlist in that all host names are placed.
i have written a small script
#./testping
#! /bin/bash
for i in `cat serverlist`
do
ping $i >> output.txt
done
so now it creates a file output.txt till here fine..
now each time i run this script the output file... (4 Replies)
I am struck up with a problem and that is with output redirection.
I used all the ways for the redirection of the output of c binary to a file, still it is failing.
Here are the different ways which I have used:
./a.out | tee -a /root/tmp.txt 2>&1
./a.out | tee -a /root/tmp.txt 1>&1
./a.out |... (2 Replies)
Hi,
I have 1000 files names data1.txt through data1000.txt inside a folder. I want to write a script that will take each first line from the files and write them as output into a new file. How do I go about doing that? Thanks! (2 Replies)
Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions.
... (4 Replies)
Hi Guys,
I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts.
I used below but it is not working:
OFILE=/home/home1/report1
echo "report1 details" > $OFILE
=/home/home1/1.sh > $OFILE
echo... (7 Replies)
Hi,
I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed.
Below is my sample... (14 Replies)
Hi Team -
I"m very new to Shell Scripting so I have a rather novice question. My forte is Windows Batch Scripting so I was just wondering what the Shell Script equivalent is to the DOS command %~n?
%~n is a DOS variable that dispayed the script name.
For instance (in DOS):
REM... (11 Replies)
Shell script logic
Hi
I have 2 input files like with file 1 content as (file1)
"BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt
File 2 contents as fle(2)
"BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt
I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
LEARN ABOUT FREEBSD
who
WHO(1) BSD General Commands Manual WHO(1)NAME
who -- display who is on the system
SYNOPSIS
who [-abHmqsTu] [am I] [file]
DESCRIPTION
The who utility displays information about currently logged in users. By default, this includes the login name, tty name, date and time of
login and remote hostname if not local.
The options are as follows:
-a Equivalent to -bTu, with the exception that output is not restricted to the time and date of the last system reboot.
-b Write the time and date of the last system reboot.
-H Write column headings above the output.
-m Show information about the terminal attached to standard input only.
-q ``Quick mode'': List the names and number of logged in users in columns. All other command line options are ignored.
-s Show the name, line and time fields only. This is the default.
-T Indicate whether each user is accepting messages. One of the following characters is written:
+ User is accepting messages.
- User is not accepting messages.
? An error occurred.
-u Show idle time for each user in hours and minutes as hh:mm, '.' if the user has been idle less than a minute, and ``old'' if the user
has been idle more than 24 hours.
am I Equivalent to -m.
By default, who gathers information from the file /var/run/utx.active. An alternate file may be specified which is usually /var/log/utx.log
(or /var/log/utx.log.[0-6] depending on site policy as utx.log can grow quite large and daily versions may or may not be kept around after
compression by ac(8)). The utx.log file contains a record of every login, logout, crash, shutdown and date change since utx.log was last
truncated or created.
If /var/log/utx.log is being used as the file, the user name may be empty or one of the special characters '|', '}' and '~'. Logouts produce
an output line without any user name. For more information on the special characters, see getutxent(3).
ENVIRONMENT
The COLUMNS, LANG, LC_ALL and LC_TIME environment variables affect the execution of who as described in environ(7).
FILES
/var/run/utx.active
/var/log/utx.log
/var/log/utx.log.[0-6]
EXIT STATUS
The who utility exits 0 on success, and >0 if an error occurs.
SEE ALSO last(1), users(1), w(1), getutxent(3)STANDARDS
The who utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').
HISTORY
A who command appeared in Version 1 AT&T UNIX.
BSD February 11, 2012 BSD