10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have files with fixed length fields.
12345 12345 12345671234567 10 1234567
12345 12345 123456 1234567 10 1234567
I want to take 1st, 3rd, 4th and 6th string.
Usually 3rd and 4th string are coming as it is on the first row /1234567 and... (3 Replies)
Discussion started by: apenkov
3 Replies
2. Shell Programming and Scripting
Hi,
I have data as below
And I want output as
Thanks (5 Replies)
Discussion started by: Anjan1
5 Replies
3. Shell Programming and Scripting
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies
4. Shell Programming and Scripting
I have this
text.filecharles darwin sam delight
george washington johnson culper
darwin sam delight
micheal jackson penny lite and would like to remove the row, if the first field is blank. so the result would be:
result.filecharles darwin sam ... (4 Replies)
Discussion started by: charles33
4 Replies
5. Shell Programming and Scripting
Hi friends,
Plz tell how to remove a row from a file thrugh awk command.
Thanks in advance,:) (3 Replies)
Discussion started by: sivaranga001
3 Replies
6. Shell Programming and Scripting
I have data like:
Blue Apple 6
Red Apple 7
Yellow Apple 8
Green Banana 2
Purple Banana 8
Orange Pear 11
What I want to do is if $2 in a row is the same as $2 in the previous row remove that row. An identical $2 may exist more than one time.
So the out file would look like:
Blue... (4 Replies)
Discussion started by: dcfargo
4 Replies
7. Shell Programming and Scripting
Hi all,
I need to prune a var's content as follows:
VAR='blah blah # seew seew'
NEWVAR='blah blah'
(without blanks)
I need also to perform this change by using variable substitution within bash shell. I've tried it with the following subst:
VAR2=${VAR/ \#*/}
but the... (7 Replies)
Discussion started by: yomaya
7 Replies
8. Shell Programming and Scripting
Hi, I am having a file and grabbed the contents of the field according to field widths. The command i used is:
awk 'BEGIN{FIELDWIDTHS="10 25 20 14 6 10"}{print$4,$5,$6}' newtext.text >test1.txt
i got the output for example:
val1 val2 val3
<blank> ... (3 Replies)
Discussion started by: rish_max
3 Replies
9. Shell Programming and Scripting
Hi
I need to delete trailing spaces, tabs and unprintable charactes from the file.
This file has a number of blank lines which should be left intact. Another words I am trying to remove the junk at the end of each line. Does anyone come across the similar problem? Thanks a lot for any help -A (3 Replies)
Discussion started by: aoussenko
3 Replies
10. Shell Programming and Scripting
Hi,
Im trying to write something that will report if a filesytem is over 80% but the problem is the output reports on a dir that is a 9%.
any ideas?
this is what I have
*************************************************
if
then
param=90
else
param=$1
fi
df -kl | grep... (1 Reply)
Discussion started by: collie
1 Replies