10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Trying to find out how to discover if the first 2 characters of a string are "22"
Not sure how.
I could use
if ]; then echo "yes";fi
But I think that will only grab the pattern 22 and not the first 2 digits. (5 Replies)
Discussion started by: newbie2010
5 Replies
2. Shell Programming and Scripting
I have a file with the contents below "lets say the name of the file is abcxyz" shown at the end of this.
I am using nawk to find the exact ip address and the 6 lines after the match is found using the following nawk statement
/usr/bin/nawk "/111.46.14.107/,printed==6 { ++printed; print; }"... (7 Replies)
Discussion started by: knijjar
7 Replies
3. Shell Programming and Scripting
HI,
Can you tell me how to find the number of digits in a word.
$cat data.txt
+123456ad
87645768
Output should be
6
8 (5 Replies)
Discussion started by: ashwin3086
5 Replies
4. Shell Programming and Scripting
Hi all,
I have a file like this
ID 3BP5L_HUMAN Reviewed; 393 AA.
AC Q7L8J4; Q96FI5; Q9BQH8; Q9C0E3;
DT 05-FEB-2008, integrated into UniProtKB/Swiss-Prot.
DT 05-JUL-2004, sequence version 1.
DT 05-SEP-2012, entry version 71.
FT COILED 59 140 ... (1 Reply)
Discussion started by: manigrover
1 Replies
5. Shell Programming and Scripting
Hello all! I've looked all over the internet and this site and have come up a loss with an easy way to make a bash script to do what I want to do. I have a file with a naming convention as follows:
2012-01-18 string of words here 123.jpg
2012-01-18 string of words here 1234.jpg
2012-01-18... (2 Replies)
Discussion started by: Buzzman25
2 Replies
6. Shell Programming and Scripting
Hi All,
I have a file of decimal numbers,
cat file1.txt
1.1382666907
1.2603107334
1.6118799297
24.4995857056
494.7632588468
560.7633734425
.....
I want to see the output as only 7 digits after decimal (5 Replies)
Discussion started by: senayasma
5 Replies
7. Shell Programming and Scripting
hi all, im having problems. I need to change all number 10 in a text file to word form, or in short from 10->ten. the thing is number 10 including in dates such as 10/22/1997 or 03-10-2011 should not be changed. im having some trouble because the file contains numbers like "price range from... (11 Replies)
Discussion started by: perlishell
11 Replies
8. Shell Programming and Scripting
Hi all
Can anybody suggest me, how to get the count of digits in a word
I tried
WORD=abcd1234
echo $WORD | grep -oE ] | wc -l
4
It works in bash command line, but not in scripts :mad: (12 Replies)
Discussion started by: ./hari.sh
12 Replies
9. Shell Programming and Scripting
Hi Can any one please post the answer for the above program.................. (4 Replies)
Discussion started by: banta
4 Replies
10. Shell Programming and Scripting
I have a log file that ends in a ".xxx" where xxx are digits but I don't necessarily know what digits they are. The log file rotates automatically and is auto-incrementing - starting at .001.
So the example would be:
file-name.005
If the file ends in .005 and the log rotates, it logically... (2 Replies)
Discussion started by: sdutto01
2 Replies