10 More Discussions You Might Find Interesting
1. Solaris
I have the following code that works perfectly in Cygwin $ awk -F, '
BEGIN {months ="AP01"; months ="AP02"; months ="AP03";
months ="AP04"; months ="AP05"; months ="AP06";
months ="AP07"; months ="AP08"; months ="AP09";
months ="AP10"; months ="AP11"; months... (3 Replies)
Discussion started by: Raul_Rodriguez
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am using awk in HP-UX to enter an encrypted entry of the password into /etc/passwd with success, this is the command I am using and it is working great.
cat /tmp/passwd.gal.before|awk -F: -v gal_passwd="encrypted_password" '{OFS=":" ; print $1,gal_passwd,$3,$4,$5,$6,$7}' >... (3 Replies)
Discussion started by: galuzan
3 Replies
3. UNIX for Advanced & Expert Users
Hi,
awk -v is having issue in sun solaris, however the same works fine in HP Superdome. Pls advise what to do, while executing below command in SunOS.
echo "this is saurabh"|awk -v a="SAURABH" '{ print a }' (2 Replies)
Discussion started by: sbaisakh
2 Replies
4. Shell Programming and Scripting
Hello,
I found this command works on Linux:
$ echo `uptime` | awk -F "load average: " '{ print $2 }'
1.60, 1.53, 1.46
but got error on Solaris:
$ echo `uptime` | awk -F "load average: " '{ print $2 }'
awk: syntax error near line 1
awk: bailing out near line 1
$ which awk... (2 Replies)
Discussion started by: seafan
2 Replies
5. Shell Programming and Scripting
Hi Friends,
the below script has been through the errors in sun solaris.
awk '/%s/{f=0 ;n++; print >(file="OUT_" n); close("OUT_" n-1)} f{ print > file}; /%s/{f=1}' $BASE_DIR/concat.TXT
awk: syntax error near line 1
awk: bailing out near line 1
And
ls $MERGE_DIR/*.R | awk '
{
... (2 Replies)
Discussion started by: krbala1985
2 Replies
6. Shell Programming and Scripting
I'm brand new to awk and need your help.
I want to be able to shut down my workstations when they become to hot (because we've lost our cooling). I found a really neat way to monitor the temperature of the system and a short, simple awk scipt to use with it:
/usr/sbin/prtpicl -v -c... (2 Replies)
Discussion started by: natural
2 Replies
7. Shell Programming and Scripting
My overall goal is to parse a large log by date range - here's my code:
awk '$0>="
This works fine with Linux but I get the following error with Solaris:
awk: syntax error near line 1
awk: bailing out near line 1
Is there a known workaround for this problem? (1 Reply)
Discussion started by: bwatlington
1 Replies
8. Shell Programming and Scripting
Why do they do two different things? Like on one version of UNIX you can use awk, but tehn if you move to Solaris then awk becomes something crap and you need to use nawk instead! whY!?!?!?! (4 Replies)
Discussion started by: linuxkid
4 Replies
9. Shell Programming and Scripting
Hi,
Pass variable in SUN SOLARIS awk
I have a file call text
server1 10.0.0.2
When i use this awk command in Mac OS and Linux , everything works as expected.
export HOSTNAME=server1
awk -v HOSTNAME=$HOSTNAME ' $1 ~ HOSTNAME { print $2 ; } ' text1
But when i entered the... (7 Replies)
Discussion started by: phamp008
7 Replies
10. Shell Programming and Scripting
Hi,
we have a shell script like this ..
# make sure all parameters are dealt with in upper case.
for option in ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9}
do
option_name=`echo ${option} | awk -F \= '{print $1}'`
if
then
SID=`echo ${option} | awk -F \= '{print $2}'`
else
... (2 Replies)
Discussion started by: talashil
2 Replies