10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
From googling and reading man pages I figured out this sorts the first column by numeric values.
sort -g -k 1,1
Why does the -n option not work? The man pages were a bit confusing.
And what if I want to sort the second column numerically? I haven't been able to figure that out. The file... (7 Replies)
Discussion started by: cokedude
7 Replies
2. UNIX for Dummies Questions & Answers
I want to get count on number of records in a few folders by running grep command for more than two columns in a row of fixed length file.
suppose if i have a fixed length file has 5 columns and I want to see the record counts for country =can and province = bc and time stamp <= 12 feb 2013... (14 Replies)
Discussion started by: princetd001
14 Replies
3. Shell Programming and Scripting
I have a code like this
v_num=9
comp_num=39
if
then
echo "pass"
fi
echo "end"
I am getting an error
ksh: v_num=99
comp_num=39
if
then
echo "pass"
fi
echo "end" (3 Replies)
Discussion started by: swayam123
3 Replies
4. Shell Programming and Scripting
How to check if the file contains only numeric values.
I don't want to read entire file it eats lot of cpu
Or any way which consumes less memory n cpu..
Please suggest
-S (2 Replies)
Discussion started by: sunilmenhdiratt
2 Replies
5. Programming
I am getting back on the C++ programming after many years away. I recently received an SDK that has code like this where numeric values end in 'U'. What does this mean?
if ((ptr % 16U) == 0U)
return buffer; (3 Replies)
Discussion started by: sneakyimp
3 Replies
6. Shell Programming and Scripting
Hello all,
I am working on a basic script but need a little help.
Issue:
I am running a SQL Query using sqlplus and a shell script. I have the output of the statement stored as variable $A. $A is set to "other text here 45678754 other text here". I need to strip all text except that numeric... (13 Replies)
Discussion started by: ownedthawte
13 Replies
7. Shell Programming and Scripting
hi all,
i'm very new to scripting and have the folllowing issue. I have used a few commands to get a list of numbers, but I need to strip away the non-numeric ones, and then need a total of all values. any ideas?
root@unixserver # cat myfile | awk '{print $8}'| sort -rn
1504
1344
896
704... (2 Replies)
Discussion started by: badoshi
2 Replies
8. Shell Programming and Scripting
I have a customer who logged some cc and bank account numbers in their apache logs. I got the cc numbers x'd out with
sed -e 's/args=\{16\}/args=XXXXXXXXXXXXXXXX/g' -e 's/cardnum=\{16\}/cardnum=XXXXXXXXXXXXXXXX/g'but that wasn't too difficult due to the value being 16 digits.
The bank account... (7 Replies)
Discussion started by: mk4mzid
7 Replies
9. Shell Programming and Scripting
given a string passed to a program that supposed to be numeric and of a certain length say 8 digits - so say for e.g. need to verify this 01234567
How would I parse this string to validat it meet requirements
I tried to use * | sed /\(\{8})/
Thanks in advance (1 Reply)
Discussion started by: dragrid
1 Replies
10. Shell Programming and Scripting
What could be the regular expression with gsub function in awk to replace all numerics having spaces before to be replaced with 0s? (1 Reply)
Discussion started by: videsh77
1 Replies