10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have a text file as belows, it includes 2 columns, 1st is the column name, 2nd is the file_name
data_file.txt
column_name file_name
col1 file1
col2 file2
col3 file1
col4 file1
col5 file2
now, i would like to... (4 Replies)
Discussion started by: tester111
4 Replies
2. UNIX for Advanced & Expert Users
Hi All,
Am needing advise on how to convert xls file to xlsx format on Solaris unix command line or scripting. I tried searching online but it looks like I need to either use Perl packages of Excel or Python packages or some other 3rd party tool. Problem is to install any of these will require... (2 Replies)
Discussion started by: arvindshukla81
2 Replies
3. Shell Programming and Scripting
Hi all,
I am having problem in understanding the following line of code ..
/home/rmsbatch/autoscript/autorms.ksh dc_load_main.ksh -q belk_dc_load_tran_data.seq
What's being done here ? what does "-q" means ? What does ".seq" file means in unix "belk_dc_load_tran_data.seq"
Please... (3 Replies)
Discussion started by: LoneRanger
3 Replies
4. Shell Programming and Scripting
Input are file and file1
file contains
store.bal
product.bal
category.bal
admin.bal
file1 contains
flip.store.bal ::FFFF:BADC:CD28,::FFFF:558E:11C5,6,8,2,1,::FFFF:81C8:CA8B,::FFFF:BADC:CD28,1,0,0,0,::FFFF:81C8:11C5,2,1,0,0,::FFFF:81DC:3111,1,0,1,0
store.bal.... (2 Replies)
Discussion started by: veeruasu
2 Replies
5. Shell Programming and Scripting
#!/bin/bash
file1="yxd"
for file in `cat file3.txt`;
do
cat $file1 | awk '{split($1,dp,"."); lend=length(dp); if(lend>2) { dom=dp"."dp; split($2,ipl,","); for(i=1; i<=length(ipl); i++) { if(ipl~/:/) { if(ipl~/:/) i++; rip=ipl; i++; raq=ipl; rtq=0; si=i+4; for(;i<si;i++) rtq+=ipl; rsub="";... (2 Replies)
Discussion started by: veeruasu
2 Replies
6. Shell Programming and Scripting
I'm trying to write a bash script called YN that looks like the following
YN "Specify a question" "doThis" "doThat"
where "doThis" will be executed if the answer is "y", otherwise "doThat".
For example
YN "Do you want to list the file dog?" "ls -al dog" ""
Here's my attempt... (3 Replies)
Discussion started by: LeoKSimon
3 Replies
7. Shell Programming and Scripting
so in unix this command works works and shows me a list of directories
find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt
but when i try running a perl script to run this command
my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies
8. UNIX for Advanced & Expert Users
Hi,
Well my title isn't very clear I think. So to understand my goal:
I have a script "test1"
#!/bin/bash
xvkbd -text blabla
with xbindkeys, I bind F5 key in order it runs my test1 script
So when I press F5, test1 runs.
I'm under Emacs/Vi and I press F5 in order to have "blabla" be... (0 Replies)
Discussion started by: xib.be
0 Replies
9. Shell Programming and Scripting
Hi ,
I have a piece of code ...wherein I need to assign the following ...
1) A command line argument to a variable
e.g origCount=ARGV
2) A unix command to a variable
e.g result=`wc -l testFile.txt`
in my awk shell script
When I do this :
print "origCount" origCount --> I get the... (0 Replies)
Discussion started by: sweta_doshi
0 Replies
10. Shell Programming and Scripting
Could anybody help me.
I need to create a script that reads a text file from STDIN and prints out the file to STDOUT with line numbers at the beginning of each line.
Thanks. (5 Replies)
Discussion started by: mascorro
5 Replies
logger(1) General Commands Manual logger(1)
NAME
logger - Makes entries in the system log
SYNOPSIS
/usr/bin/logger [-f file] [-i] [-p[facility.]priority] [-t tag] [message...]
logger [-b] [message...]
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
logger: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
[Tru64 UNIX] Logs the informational message to the binary event logger instead of the syslog() subroutine and enters information in the
binary event log file. The uerf command with the -r 250 option reports the informational messages that are in the binary event log file,
which is used for system maintenance and troubleshooting. The -b option cannot be used with any other options. [Tru64 UNIX] Logs all
lines in file. [Tru64 UNIX] Logs the process ID (PID) of the logger process with each line. [Tru64 UNIX] Enters the message with the
specified priority and, if specified, from the specified facility.
[Tru64 UNIX] You can specify priority as either an alphabetic string or its integer equivalent. You can specify the following val-
ues for the priority variable: [Tru64 UNIX] (0) [Tru64 UNIX] The system is unusable. (0) [Tru64 UNIX] Action must be taken imme-
diately. (1) [Tru64 UNIX] Critical conditions. (2) [Tru64 UNIX] Error conditions. (3) [Tru64 UNIX] (3) [Tru64 UNIX] (4)
[Tru64 UNIX] Warning conditions. (4) [Tru64 UNIX] Normal but significant condition. (5) [Tru64 UNIX] Informational. (6) [Tru64
UNIX] Debug-level messages. (7)
[Tru64 UNIX] You can also specify a value for the facility variable, which indicates the source of the event. You can specify
facility as either an alphabetic string or its integer equivalent. The integer values appear in parentheses. You can specify the
following values for the facility variable: [Tru64 UNIX] Kernel messages. (0) [Tru64 UNIX] Random user-level messages. (8) [Tru64
UNIX] Mail system. (16) [Tru64 UNIX] System daemons. (24) [Tru64 UNIX] Security/authorization messages. (32) [Tru64 UNIX] (32)
[Tru64 UNIX] Messages syslogd generates internally. (40) [Tru64 UNIX] Line printer subsystem. (48) [Tru64 UNIX] Network news
subsystem. (56) [Tru64 UNIX] UUCP subsystem. (64) [Tru64 UNIX] Clock daemon. (72) [Tru64 UNIX] (128) [Tru64 UNIX] (136)
[Tru64 UNIX] (144) [Tru64 UNIX] (152) [Tru64 UNIX] (160) [Tru64 UNIX] (168) [Tru64 UNIX] (176) [Tru64 UNIX] (184) [Tru64
UNIX] Precedes each entry in the log with tag.
OPERANDS
You can specify the message to be used for entries on the command line or with the -f file option, which specifies that each line in file
be logged as an entry. If you do not specify message or -f, logger reads standard input.
DESCRIPTION
The logger command makes the specified entries in the system log file.
The logger command provides a program and shell script interface to the syslog() subroutine. The file in which entries are made depends on
the current system log configuration; see syslog and syslogd for more information.
NOTES
The effects of the environment variable LC_MESSAGES apply only to diagnostic messages generated by logger, and not to any messages written
by the use of the command.
EXIT STATUS
The following exit values are returned: Successful completion. An error occurred.
EXAMPLES
To log the system reboot, including the process ID of the process running logger, enter: logger -i System rebooted To log each line in the
file build.events with the tag trial build preceding them, enter: logger -f build.events -t "trial build" The following commands are equiv-
alent and enter events of warning priority to the log: logger -p warning
logger -p 4 The following commands are equivalent and enter events from the daemon facility of warning priority: logger -p daemon.warning
logger -p 24.4 To specify the debug priority with a priority name, enter: logger -p debug my message
To specify the debug priority with a priority number, enter: logger -p 7 my message To specify both debug priority and the user
facility, enter: logger -p user.debug my message
To specify the same facility/priority pair using numeric values, enter: logger -p 8.7 my message
You can also combine alphabetic and numeric specifications: logger -p user.7 my message logger -p 8.debug my message
ENVIRONMENT VARIABLES
The following environment variables affect the execution of logger: Provides a default value for the internationalization variables that
are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization
variables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string
value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of
bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments). Determines the locale for
the format and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing
of LC_MESSAGES.
SEE ALSO
Commands: binlogd(8), syslogd(8), uerf(8)
Functions: syslog(3)
Standards: standards(5)
logger(1)