Sponsored Content
Top Forums Shell Programming and Scripting what's wrong with my awk line? Post 302692765 by Franklin52 on Tuesday 28th of August 2012 05:36:02 AM
Old 08-28-2012
This should be sufficient:
Code:
free | awk '/Mem/ && int($2/1024/1024) < 2 {print "The free mem need to be more than 2G"}'

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Whats wrong with this 5 line script!

Hi #!/bin/sh user=$1 if " -eq 0 ] echo "No" else echo "Yes" fi I'm not quite sure whats wrong with this but I know its something silly. Any ideas? Thanks (9 Replies)
Discussion started by: c19h28O2
9 Replies

2. UNIX for Dummies Questions & Answers

What's wrong with this line: if ${TEST:?} ; then echo empty; fi

I want to print "empty" if $TEST is empty. TEST= if ${TEST:?} ; then echo empty; fi But it doesn't work. What's wrong? (2 Replies)
Discussion started by: meili100
2 Replies

3. Shell Programming and Scripting

Whats wrong with this line?

I have a file $I_FILE that I need to filter and store the 1st and the 9th columns in another file $O_FILE. With this in Perl, system ("awk -F, '{print \$1, \$9}' \$I_FILE | sed '\/^\$\/d' > O_FILE"); I get: 4096045055 The first line in I_FILE is:... (5 Replies)
Discussion started by: looza
5 Replies

4. Shell Programming and Scripting

what is wrong with this line?

system ("$ssh '$perf_stats' < temp_pipe 2>&1 &"); I need to start and interact with my executable defined by perf_stats on a remote machine but not change my command line to that of the remote machine. temp_pipe is a node created by mknod -f temp_pipe (6 Replies)
Discussion started by: looza
6 Replies

5. Shell Programming and Scripting

whats wrong with this line using perl

E:\>perl -00ne 'push @a,"$_\0$ARGV\n";END{print reverse split/\0/ for sort @a}' file1-obj_prof.out.txt file2-obj_prof.out.txt' Can't find string terminator "'" anywhere before EOF at -e line 1. (6 Replies)
Discussion started by: richsark
6 Replies

6. Shell Programming and Scripting

what is wrong with this expr line

It keeps giving me expr syntax error. expr "${etherline }" : ’.*no match found’ 2>&1 >/dev/null Thanks in advance. (1 Reply)
Discussion started by: shadow_boi
1 Replies

7. Shell Programming and Scripting

What's wrong with this command line pls?

I executed the following command and got Arg List too long. find /dir1/dir2/LOG_* -prune -type f -mtime +3 -exec echo {} \; What's that about? (2 Replies)
Discussion started by: bbbngowc
2 Replies

8. Shell Programming and Scripting

SED to delete last word on line...what's wrong?

I have a line that gets pulled from a database that has a variable number of fields, fields can also be of a variable size. Each field has a variable number of spaces between them so there is no 'defined' delimiter. The LastData block is always a single word. What I want to do is delete the... (2 Replies)
Discussion started by: Bashingaway
2 Replies

9. Shell Programming and Scripting

What is wrong with tiny (g)awk line ??

Hi I wish to capitalize the first letter or every word in a text file with: gawk '{$0=gensub(/(\w)(\w*)/,toupper("\\1")"\\2","g");}' file.txtBut it doesn't work...: target: bla test Test TEST yes nO Yes yes restult: bla test Test TEST yes nO Yes yes any idea? thanks (11 Replies)
Discussion started by: louisJ
11 Replies

10. Shell Programming and Scripting

What's wrong with this awk?

I have a file and if I'm doing following action on that file it's coming up correctly awk -F"," '/DATA_TYPE/ { cnt += $3 } END { print " DATA_TYPE count=" cnt}' inter DATA_TYPE count=19593131 now if I'm changing same AWK, so that now it can accept variable, then it's somehow not working.... (3 Replies)
Discussion started by: manas_ranjan
3 Replies
GAP(1)								   User Commands							    GAP(1)

NAME
GAP - Groups, Algorithms and Programming DESCRIPTION
GAP is a system for computational discrete algebra with particular emphasis on computational group theory, but which has already proved useful also in other areas. In the example text, gap is used to analyse Rubik's Cube using group theory. A kernel implements a pascal-like language. OPTIONS
usage: gap [OPTIONS] [FILES] run the Groups, Algorithms and Programming system, Version 4.4.8 -h print this help and exit -b disable/enable the banner -q enable/disable quiet mode -e disable/enable quitting on <ctr>-D -f force line editing -n prevent line editing -x <num> set line width -y <num> set number of lines -g show GASMAN messages (full garbage collections) -g -g show GASMAN messages (all garbage collections) -m <mem> set the initial workspace size -o <mem> set hint for maximal workspace size (GAP may allocate more) -K <mem> set maximal workspace size (GAP never allocates more) -c <mem> set the cache size value -a <mem> set amount to pre-malloc-ate postfix 'k' = *1024, 'm' = *1024*1024, 'g' = *1024*1024*1024 -l <paths> set the GAP root paths -r disable/enable reading of the '.gaprc' file -A disable/enable autoloading of GAP packages -B <name> current architecture -D enable/disable debugging the loading of library files -M disable/enable loading of compiled modules -N disable/enable check for completion files -T disable/enable break loop -X enable/disable CRC for comp. files while reading -Y enable/disable CRC for comp. files while completing -i <file> change the name of the init file -L <file> restore a saved workspace -R prevent restoring of workspace (ignoring -L) Boolean options (b,q,e,r,A,D,M,N,T,X,Y) toggle the current value each time they are called. Default actions are indicated first. AUTHORS
The GAP Group <http://www.gap-system.org> COPYRIGHT
Copyright (1987--2006) by the GAP Group, GAP is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. SEE ALSO
gac(1) update-gap-workspace(1) You can read the complete manual in /usr/share/gap/doc or you can use the online help system. Type ?help inside GAP to access it. Type ?Reference: options!under UNIX to access the full documentation of options. The GAP team October 2006 GAP(1)
All times are GMT -4. The time now is 06:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy