10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to understand what the grep command in ubuntu is trying to do here.
The contents of my test file is given below
harsha@harsha-H67MA-USB3-B3:~/Documents$ cat data
abcd
efghi
jklmno
pqr
stuv
wxyz
When I grep for 3 dots (...) without the parenthesis as follows I would expect the... (4 Replies)
Discussion started by: sreeharshasn
4 Replies
2. Shell Programming and Scripting
I am trying to match mulitple (3) variables. I found the sub given below on the web which works well when all vars are defined. But there are situations where one or two will not be defined (at least one will always be defined.)
Example of the variable content possibilities
The sub found... (4 Replies)
Discussion started by: popeye
4 Replies
3. Programming
hi to all,
i am writing a simple file program in C which has to take a string of length n as input and match that input string with first n character of the line in file. if it does not match it has to compare with first n characters of next line. i am finding it difficult to know how exactly to... (2 Replies)
Discussion started by: ntrikoti
2 Replies
4. Homework & Coursework Questions
I need to write an Unix script to report the number of SQL files in my home directory, ending with .sql . The script should, also, be checking whether there is a file with an underscore in its name. If that is the case, the underscore should be converted to a dash (‐); for example... (1 Reply)
Discussion started by: ronoz-4
1 Replies
5. UNIX for Dummies Questions & Answers
I want to check where our programmers are using "delete" instead of "delete" in their C++ code:
grep -r delete *cpp | grep -v
However, this statement and variations thereof (escaping with backslash (\), single quotes ('), double quotes ("), accolades ({)) always lead to the following message:... (2 Replies)
Discussion started by: figaro
2 Replies
6. Shell Programming and Scripting
hi
i am writing a hangman script and am having trouble checking the correct letters against the word
i need the script to compare the word against the letters guessed that are correct so once all the letters within the word have been guessed it will alow me to create a wining senario
eg
... (3 Replies)
Discussion started by: lsecer
3 Replies
7. UNIX for Dummies Questions & Answers
Dear all,
I'm stuck on a certain problem regarding counting the number of characters in one line and then adjusting the number of characters of another line to this number.
This was my original input data:
@HWI-ST471_57:1:1:1231:2079/2... (4 Replies)
Discussion started by: DerSeb
4 Replies
8. Shell Programming and Scripting
Hi there,
I have a file with lines like these:
0105:ffff0000:001b:01f4:25:434
0299:ffff0000:0009:01f4:2:319
02d2:ffff0000:000e:01f4:2:507
The above values are split up using ":" characters.
I would like capture each value, no matter what length.
Take for example the first line... (8 Replies)
Discussion started by: MastaG
8 Replies
9. UNIX for Dummies Questions & Answers
how do i check if the first character is a parenthese in pattern matching?
if ] obviously doesnt work. How do I use it to compare so it doesnt try to use it to group. (5 Replies)
Discussion started by: questionasker
5 Replies
10. UNIX for Dummies Questions & Answers
please send the logic or program to find the matching characters between two strings
for ex string1 :abc
string2 :adc
no .of matching characters is 2(a,c) (9 Replies)
Discussion started by: akmtcs
9 Replies