10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have the following script that will print column 4 ("25") when column 1 contains "123". However, I need to ignore the alpha characters that are contained in the input file. If I were to ignore the characters my output would be column 3.
What is the best way to print my column of interest... (3 Replies)
Discussion started by: ncwxpanther
3 Replies
2. Shell Programming and Scripting
Split column data if the table has n number of column's with some record then how to split n number of colmn's line by line with records
Table
---------
Col1 col2 col3 col4 ....................col20
1 2 3 4 .................... 20
a b c d .................... v
... (11 Replies)
Discussion started by: Priti2277
11 Replies
3. Shell Programming and Scripting
please write a shell script
Table
--------------------------
1 2 3 a b c
3 4 5 c d e
7 8 9 f g h
Output should be like this
---------------
1 2 3
3 4 5
7 8 9
a b c
c d e
f g h (1 Reply)
Discussion started by: Priti2277
1 Replies
4. Shell Programming and Scripting
Input file :
5 20
500 2
20 41
41 0
23 1
Desired output :
5
2
20
0
1
By comparing column 1 and 2 in each line, I hope can print out the column with smallest number.
I did try the following code, but it don't look good :( (2 Replies)
Discussion started by: perl_beginner
2 Replies
5. Shell Programming and Scripting
I have a file as follows
ATOM 5181 N AMET K 406 12.440 6.552 25.691 0.50 7.37 N
ATOM 5182 CA AMET K 406 13.685 5.798 25.578 0.50 5.87 C
ATOM 5183 C AMET K 406 14.045 5.179 26.909 0.50 5.07 C
ATOM 5184 O MET K... (14 Replies)
Discussion started by: hasanabdulla
14 Replies
6. Shell Programming and Scripting
Hi all,
I want to count total no. of characters in a column. and if no. of charaters are more than 3 then it must replace it by splitted string. ie, it must place a space after 3 characters.
Ex:
21 435g asd3dd jklfjwe wer
column number 3 has 4 alphanumeric character, so it must be splitted... (3 Replies)
Discussion started by: CAch
3 Replies
7. Shell Programming and Scripting
Hi all,
Can someone help me in getting the following o/p
I/p:... (7 Replies)
Discussion started by: Sri3001
7 Replies
8. Shell Programming and Scripting
Hi i have data like
abchd 124 ldskc aattggcc
each separated by tab space i want to count number of characters in 4th column and print it in new column with tabspace for every line can anyone help me how to do it.
Thanks. (3 Replies)
Discussion started by: bhargavpbk88
3 Replies
9. UNIX for Dummies Questions & Answers
for some reason word count always counts one extra character.
for example,
echo 11 | wc -c
counts 3 characters instead of 2
anyone know how to get the exact number of characters? (1 Reply)
Discussion started by: metalwarrior
1 Replies
10. Shell Programming and Scripting
Hi,
I am trying to execute the following command from a batch script, but no matter how many escape characters I put in it doesn't execute properly. It works fine from the command line with quotes around the -exec part.
#!/bin/sh
/usr/local/bin/sudo /usr/atria/bin/cleartool setview -exec... (0 Replies)
Discussion started by: Sebarry
0 Replies