10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file
Line 1 a
Line 22
Line 33
Line 1 b
Line 22
Line 1 c
Line 4
Line 5
I want to delete all lines before last occurrence of a line which contains something which is defined in a variable. Say a variable var contains 'Line 1', then I need the following in the output.
... (21 Replies)
Discussion started by: Soham
21 Replies
2. UNIX for Beginners Questions & Answers
I have two files say FILE1 and FILE2.
FILE1 contains 80,000 filename in sorted order and another file FILE2 contains 6,000 filenames is also in sorted order.
I want to compare the filename for each file and copy them in to a folder when filename is matched.
File1.txt contain 80,000... (8 Replies)
Discussion started by: imranrasheedamu
8 Replies
3. Shell Programming and Scripting
I have an application(Minecraft Server) that generates a logfile live. Using Crontab and screen I send a 'list' command every minute.
Sample Log view:
2013-06-07 19:14:37 <Willrocksyea1> hello*
2013-06-07 19:14:41 <Gromden29> hey
2013-06-07 19:14:42 Gromden29 lost connection:... (1 Reply)
Discussion started by: gatekeeper258
1 Replies
4. Shell Programming and Scripting
Hi,
I am writing a shell script to parse some files, and gather data.
The data in the files is displayed as below.
.......xyz: abz: ......qrt: ....
.......xyz: abz: ......qrt: ...
I have tried using awk and cut, but the position of these values keep changing, so I wasn't able to get... (2 Replies)
Discussion started by: Serena
2 Replies
5. Shell Programming and Scripting
Here in the input file
23:59:13,devicename,21,server1,700
23:59:13,devicename,22,server2,200
23:59:13,devicename,23,server3,200
23:59:13,devicename,24,server4,200
23:59:13,devicename,25,server5,200
23:59:13,devicename,26,server6,200
23:59:13,devicename,27,server7,200... (6 Replies)
Discussion started by: necro98
6 Replies
6. Shell Programming and Scripting
Please help me with this:
I need to compare two values in if condition in shell script but its goes always to else condition:
TIME_CHECK=PM
TIME-CLOCK=PM
if ; then
echo "You have access!"
else
echo "ACCESS DENIED!"
fi (5 Replies)
Discussion started by: aroragaurav.84
5 Replies
7. Red Hat
Hello All,
I am running the below code in my script. I want if jk is empty nothing should be appened to the file total_usage.
but apparently its not happening.Kindy let me know how to do it.
###################################
jk=`ps auxf |grep -w $inputline|tr -s " "|cut -d... (0 Replies)
Discussion started by: ajaincv
0 Replies
8. Shell Programming and Scripting
one.txt
ONS.1287677000.820.log 20Oct2010
ONS.1287677000.123.log 21Oct2010
ONS.1287677000.456.log 22Oct2010
two.txt
ONS.1287677000.820.log:V AC CC EN
ONS.1287677000.123.log:V AC CC EN
ONS.1287677000.820.log:V AC CC EN
In file two.txt
i have to look for pattern which column one... (17 Replies)
Discussion started by: saluja.deepak
17 Replies
9. Shell Programming and Scripting
dear all
i had two variable in my script.
var1 and var2
var1= 10 ( it will part of date op ) Fri Aug 8 10:05:09 IST 2008
var2=9 ( it will op of ls -ltr and time part of it.)
now i want to compare of them and want to do some task if both are are not same.
kindly let me know possible... (0 Replies)
Discussion started by: jaydeep_sadaria
0 Replies
10. Shell Programming and Scripting
I am new to unix and need to learn how to compare a variable $subject to a string pattern. If the variable has the word "Item" in it then it should be true. How do I do this? Currently I am using the Bourne shell but I can also use Korn or Bash.
I come from a Rexx background where strings are... (2 Replies)
Discussion started by: jerryte
2 Replies