11-11-2009
Question about awk commands
what does this mean?
cat /etc/passwd | awk -F: '{print $5}' | \
awk -F, '{print $1}' | \
awk '{print tolower($l)};{print tolower($2)}' | \
grep -v '^$' >> local_tmp
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi everyone
I am a newbbie in the linux enviroment. My problem is:
I have tried to use the at command to compile and keep running a program and close the terminal window.
Every time I use the at command I get the next error
"Can't open /var/run/atd.pid to signal atd. No atd running?"
... (2 Replies)
Discussion started by: fenixbeta
2 Replies
2. Shell Programming and Scripting
Is there a way to shorten these commands? because this script asks for a password 3 times
scp -p /usr/local/bin/${script_name} ${servername$iy]}://usr/local/bin/
ssh ${servernames} /usr/local/bin/${script_name}
ssh ${servernames} rm -f /usr/local/bin/${script_name}
Basically, I'm creating a... (3 Replies)
Discussion started by: pdtak
3 Replies
3. Shell Programming and Scripting
Hello,
I have the following is a txt file:
!!! man.uni.com address 141.000.001 to you.uni.com
!!! man.uni.com address 141.000.002 to wae1.uni.com
!!! man.uni.com address 141.000.003 to kim2.uni.com
I want to get you,wae and kim from the text and put them in a diffrent file in the following... (2 Replies)
Discussion started by: andrew1400
2 Replies
4. Shell Programming and Scripting
Hi,
I have a scenario where in, I have a file named abc.txt.
I extract the file names from it using.
awk '/dbf$/{print $NF}' abc.txt
/u01/oradata/omc/systab/omcdef.dbf
/u01/oradata/omc/oratemp/temptab1.dbf
Now I need to further enhance this command and also extract the mount point... (3 Replies)
Discussion started by: geetap
3 Replies
5. UNIX for Dummies Questions & Answers
Hi I'm pretty new to scripting and I've been googling around looking for an answer but have yet to come up with a proper solution. I work with multiple android devices at a time and I'm looking to simplify my life with a script. Basically I'm looking for a script that takes the device ID's and then... (2 Replies)
Discussion started by: Onyoursix
2 Replies
6. UNIX for Dummies Questions & Answers
hey guys, i'm in a unix course.. and while this is a homework question - i did put alittle effort into it. just wanted to ask before trial and error drives me nuts.
question 13 has us saving the last 30 characters of a file into another file
and question 14 has us saving the list of all the... (1 Reply)
Discussion started by: labelthief
1 Replies
7. Shell Programming and Scripting
if ]
then
rm -rf
Can anyone tell me what are they checking in the if loop
Please use code tags next time for your code and data. Thanks (2 Replies)
Discussion started by: ramkumar15
2 Replies
8. Shell Programming and Scripting
I am using HP-UXsystem. I am unable to use the below sed commands. could you please let us know the alternate commands for it.
>sed '/unix/ c "Change line"' file.txt
sed '/unix/ i "Add a new line"' file.txt
any inputs please (5 Replies)
Discussion started by: ramkumar15
5 Replies
9. Shell Programming and Scripting
can you please let me know what does the below awk command does.
awk 'NR>2{printf "%-30s %-15s\n", $1, !($4)?$2:$4;}' result.txt (1 Reply)
Discussion started by: ramkumar15
1 Replies
10. Shell Programming and Scripting
I have developed a bash shell script which works perfectly fine when any bash shell is in use except SunOS.
There are two commands that is not compatible.
#!/usr/bin/env bash
Problem
1. The awk command below does not work for SunOS
Requirement
We extract Oracle EBS tables into text... (9 Replies)
Discussion started by: uuuunnnn
9 Replies
LEARN ABOUT OPENSOLARIS
tolower
tolower(3C) Standard C Library Functions tolower(3C)
NAME
tolower - transliterate upper-case characters to lower-case
SYNOPSIS
#include <ctype.h>
int tolower(int c);
DESCRIPTION
The tolower() function has as a domain a type int, the value of which is representable as an unsigned char or the value of EOF. If the
argument has any other value, the argument is returned unchanged. If the argument of tolower() represents an upper-case letter, and there
exists a corresponding lower-case letter (as defined by character type information in the program locale category LC_CTYPE), the result
is the corresponding lower-case letter. All other arguments in the domain are returned unchanged.
RETURN VALUES
On successful completion, tolower() returns the lower-case letter corresponding to the argument passed. Otherwise, it returns the argument
unchanged.
ERRORS
No errors are defined.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
|ATTRIBUTE TYPE |ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
_tolower(3C), setlocale(3C), attributes(5), standards(5)
SunOS 5.11 14 Aug 2002 tolower(3C)