10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want count number of characters / find the length of the 'wc -l' output
This is the command
bash-3.2$ gzcat /home/sid/file1.dat |wc -l
830752
So final out I want is 6 i.e lenght of 830752
I tried with awk
bash-3.2$ gzcat /home/sid/file1.dat |wc -l | awk '{print length ($0)... (3 Replies)
Discussion started by: sidnow
3 Replies
2. Shell Programming and Scripting
Hello:
I have a large file which contains lines like the following:
1/t123ab, &Xx:1:1234:12345:123456@ABCDEFG... at -$100.00%
/t is a tab, spaces are as indicated
the string "&Xx:1:1234:12345:123456$ABCDEFG..." has a slightly variable number of numbers and letters, but it always starts... (9 Replies)
Discussion started by: Tectona
9 Replies
3. 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
4. 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
5. UNIX for Dummies Questions & Answers
Hello,
I'm new to using AWK and would be grateful for some basic advice to get me started.
I have a file consisting of 10 fields. Initially I wish to calculate the number of . , ~ and ^ characters in the 9th field ($9) of each line. This particular string also contains alphabetical... (6 Replies)
Discussion started by: Olly
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I would like to take the first column of a bunch of lines and take only the 6th through 15th characters. The first column are not regular.
gbAY277147.1Ptv3.T1469 CTTGAACAT
gbAY277149.1Ptro3.T1469 CTTGAACAT
gbAY287891.1Hs3.T1469 CTTGAACATTTGC
into
7147.1Ptv3 CTTGAACAT... (4 Replies)
Discussion started by: mikey11415
4 Replies
7. Shell Programming and Scripting
Hi there, I have some user input in a variable called $VAR, and i need to ensure that the string is 5 or less characters .... does anybody know how i can count the characters in the variables ?
any help would be great, cheers (2 Replies)
Discussion started by: rethink
2 Replies
8. Shell Programming and Scripting
Hi,
Could any one please let me know what is the maximum number of characters
that will fit into a single line of a flat file on a unix.
Thanks. (1 Reply)
Discussion started by: Shivdatta
1 Replies
9. Shell Programming and Scripting
Hello,
if i have file like this:
010000890306932455804 05306977653873 0520080417010520ISMS SMT ZZZZZZZZZZZZZOC30693599000 30971360000 ZZZZZZZZZZZZZZZZZZZZ202011302942311 010000890306946317387 05306977313623 0520080417010520ISMS SMT... (6 Replies)
Discussion started by: chriss_58
6 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