9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello,
I would like to write script to tail a file for different environment
But the number of lines are keep changing
How can I write a script
For example:
env could : A, B or C
and log files could be a.log, b.log and c.log
with the number of lines can change
say sometimes it 100 last... (9 Replies)
Discussion started by: encrypt_decrypt
9 Replies
2. Shell Programming and Scripting
Hi all;
Here is my file:
V1.3=4
V1.4=5
V1.1=3
V1.2=6
V1.3=6
Please, can you help me to write a script shell that counts the sum of values in my file (4+5+3+6+6) ?
Thank you so much for help.
Kind regards. (3 Replies)
Discussion started by: chercheur111
3 Replies
3. Shell Programming and Scripting
file A
E969K
D223L
E400L
E34L
file B
predicted 3
1 250
251 500
501 1000
The output should be
E969K 501 1000
D223L 1 250
E400L 251 500
E34L 1 250
I tried in this way (1 Reply)
Discussion started by: cdfd123
1 Replies
4. Shell Programming and Scripting
pls give me the solution for this i need it for my exam pls pls pls
Shell script to find the sum of first n Fibonacci numbers (1 Reply)
Discussion started by: Kshitija
1 Replies
5. Shell Programming and Scripting
Hello All,
I have 3 types of files. The names of which starts with P,I,M
like P*********
D*********
M*********
now I need to do some operations witht hese files..
so
if file name starts with P or p
then
do the operation for P file...
fi
else (20 Replies)
Discussion started by: smarty86
20 Replies
6. Shell Programming and Scripting
I want to reverse a the following:
00:11:22:33:44:55
I currently use something like below to pass it as is.
But now I want the same script to reverse the above and pass it to ethtool.
// psuedo code
i=0
skip=0
for m in $@
do
if
then
skip=1
... (1 Reply)
Discussion started by: bhanu.nani
1 Replies
7. Shell Programming and Scripting
Hi,
I am running a BASH shell with the following script. The script works and gives me correct output but is very slow with large files. The more rows and columns (width and height) the slower as you can probably see.
How can I do what I want more efficiently? Any ideas welcome. It has been... (10 Replies)
Discussion started by: macsurveyr
10 Replies
8. Shell Programming and Scripting
Suppose u have a file like
1 30
ABCSAAHSNJQJALBALMKAANKAMLAMALK
4562676268836826826868268468368282972982
2863923792102370179372012792701739729291
31 60... (8 Replies)
Discussion started by: cdfd123
8 Replies
9. Shell Programming and Scripting
Hello everybody !
GOT SOMETHING INTERESTING...
I am trying to retain line number for a text document.. usually we get line numbers in VI using :set nu , but I want to permanently store them. It's a 4000 lines of text and I want grep/search it for a list of words/fields stored in a different... (2 Replies)
Discussion started by: sdlayeeq
2 Replies