10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
First of all, apologies if this has already been answered elsewhere. I haven't quite been able to find what I'm looking for yet, so hopefully this won't come across as repetition.
I have a file consisting of ~100 nearly identical lines, each of which contains multiple instances of the string I... (11 Replies)
Discussion started by: pseudo.seppuku
11 Replies
2. Shell Programming and Scripting
Hey All,
I want want to print a string N times the number N before it.
Like i have "20 hello".
so i want to print
hello
hello
hello
.
.
.
.
. 20 times..
Please help me.. I am not able o figure out.. how to do the same? (8 Replies)
Discussion started by: jaituteja
8 Replies
3. Shell Programming and Scripting
Hi,
I have a file containing many times the word "IPaddress". and i need a command that finds that string or word and print it only once. I've tried the following but they print a line for each match:
grep "IPaddress" /directory/file.xml
find . | xargs grep 'IPaddress' -sl
i have many... (2 Replies)
Discussion started by: blacksteel1988
2 Replies
4. Programming
Hello,
i'm trying to implement the times() function and i'm programming in C.
I'm using the "struct tms" structure which consists of the fields:
The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process.
The tms_stime structure... (1 Reply)
Discussion started by: g_p
1 Replies
5. Shell Programming and Scripting
Hello Everyone,
I just started scripting this week. I have no background in programming or scripting.
I'm working on a script to grep for a variable in a log file
Heres what the log file looks like. The x's are all random clutter
xxxxxxxxxxxxxxxxxxxxx START: xxxxxxxxxxxx... (7 Replies)
Discussion started by: rxc23816
7 Replies
6. UNIX for Dummies Questions & Answers
Hi everybody,
Fairly simple question here:
I need an awk, sed, or grep command that will find the same string multiple times on one line
needs to return all lines which contain .02 twice.
I do know the exact number of characters in between the two occurrences of .02 if that helps, all... (7 Replies)
Discussion started by: jgrosecl
7 Replies
7. Shell Programming and Scripting
This is probably simple but I would like to print every line in a file 5 times like this:
awk 'NR' mens_csv.tab
Dub Tank 53%Hemp/42%Cotton/5%Lycra Jersey Dark Green 0 $22.50
Dub Tank 53%Hemp/42%Cotton/5%Lycra Jersey Indigo Blue 0 $22.50
---------------
Dub... (4 Replies)
Discussion started by: Autumn Tree
4 Replies
8. UNIX for Dummies Questions & Answers
hi
I have the input as follows
ABC =893
JKL = "jee"
alias PQR = 9833
alias STUVE = "kuiue"
I should be able to print as follows
ABC
JKL
alias PQR
alias STUVE
Thanks
Suresh (7 Replies)
Discussion started by: ssuresh1999
7 Replies
9. Shell Programming and Scripting
I have one file of numbers
4
5
2
...
And another file of strings
aaaaa bbbbb
ccccc ddddd
eeeee ffffff
...
I'd like to print the stings from each line in reverse order with some decoration the number of times listed in the first file
such as:
Yeah bbbbb aaaaa
Yeah bbbbb aaaaa (5 Replies)
Discussion started by: dcfargo
5 Replies
10. Shell Programming and Scripting
I have a file. I want to count the time for one string appears in this file
Example:
56
73
34
79
90
56
34
Expected results
2:56
1:73
2:34 (1 Reply)
Discussion started by: anhtt
1 Replies