10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,
i have a csv file like:
USERID;COG;DESCR;FIL;OFF
user001;user;test1;001;A01
user002;user;test2;002;A02
user0003;user;test3;003;A03
user004;user;test4;004;A04
user0005;user;test5;005;A05
etc..
I need to read line for line and, if value of first column is > 7 char (in this example... (4 Replies)
Discussion started by: kamose
4 Replies
2. Shell Programming and Scripting
The awk below using the sample input would output the following: Basically, it averages the text in $5 that matches if $7 < 30 .
awk '{if(len==0){last=$5;total=$7;len=1;getline}if($5!=last){printf("%s\t%f\n", last,... (6 Replies)
Discussion started by: cmccabe
6 Replies
3. UNIX for Dummies Questions & Answers
I have a fixed length file and I want to find out row number along with row length.
I have a program that give me the line length if it satisfy the condition; but i would like to add row number as well?
How do I do that?
while IFS= read -r line; do
if ; then
echo ${line}
echo... (8 Replies)
Discussion started by: princetd001
8 Replies
4. 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
5. Shell Programming and Scripting
Hello All,
i have a file with the contents like shown below
Name = POLICY1
Selected = 1
Written = 0
Name = POLICY2
Selected = 6
Written = 8
Name = POLICY3
Selected = 4
Written = 26
I want the output to be... (5 Replies)
Discussion started by: vinredmac
5 Replies
6. Shell Programming and Scripting
Hi
I'm backgrounding matlab jobs using nohup. My foreground programs are written for an xterm that has 132 columns. When I use nohup and redirect the output to nohup.out, the default appears to be something like 72 columns, which breaks up my formatted screen output from matlab commands... (1 Reply)
Discussion started by: LeoSimon
1 Replies
7. Shell Programming and Scripting
Getting tired of cut-and-paste...so I thought I would post a question.
how do I change this column output to a single row?
from this:
# vgdisplay -v /dev/vgeva05 | grep dsk | awk '{print $3}'
/dev/dsk/c6t0d5
/dev/dsk/c11t0d5
/dev/dsk/c15t0d5
/dev/dsk/c18t0d5
/dev/dsk/c7t0d5... (8 Replies)
Discussion started by: mr_manny
8 Replies
8. UNIX for Dummies Questions & Answers
I am trying to write a script which will output notifications to a logfile, but I would like to cap the logfile to, let's say, 200 lines.
Specifically I am using custom firmware, DD-wrt, on my router and I am implementing a script to connect to my work vpn. I have a loop that pings a computer... (2 Replies)
Discussion started by: joemommasfat
2 Replies
9. Shell Programming and Scripting
Hi,
I have a system under test, and I use a script that does a ps.
The output, is in the following format, it's basically the timestamp, followed by the rss and vsize.
09:03:57 68404 183656 68312 181944 69860 217360 67536 182564 69072 183172 69032 199276
09:04:27 68752 183292 70000 189020... (5 Replies)
Discussion started by: Bloke
5 Replies
10. Shell Programming and Scripting
Is there a command that sets a variable length?
I have a input of a variable length field but my output for that field needs to be set to 32 char.
Is there such a command?
I am on a sun box running ksh
Thanks (2 Replies)
Discussion started by: r1500
2 Replies