10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file like below.
1,2,3,4,5,6,7,8,9I would like to print or copied to a file based of line count in perl
If I gave a condition 1 to 3 then it should iterate over above file and print 1 to 3 and then again 1 to 3 etc.
output should be
1,2,3
4,5,6
7,8,9 (10 Replies)
Discussion started by: Anjan1
10 Replies
2. UNIX for Dummies Questions & Answers
Hi Masters,
I need to remove lines when date format is below certain date
My file input
20140906|ALASKA|USASEL|TARPUNG|2014-03-01|82176614040|20|1
20140906|ALASKA|USATENG|CRUIEX|2014-08-01|81267079997|5|0
20140906|ALASKA|USASEL|CRUIEMBANG|2013-10-01|82280779814|9|0... (4 Replies)
Discussion started by: radius
4 Replies
3. UNIX for Advanced & Expert Users
Hi ,
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 Replies)
Discussion started by: vadlamudy
7 Replies
4. Shell Programming and Scripting
I want to keep last 2 days data from a file and want to delete others data from the file. Please help me.
Sample Input
# cat messages-2
Apr 15 11:25:03 test1 kernel: imklog 4.6.2, log source = /proc/kmsg started.
Apr 15 11:25:03 test1 rsyslogd: (re)start
Apr 16 19:42:03 test1 kernel:... (2 Replies)
Discussion started by: makauser
2 Replies
5. Shell Programming and Scripting
Hello. I'm trying to delete the lines of a file does not contain the letter "T " (for example) at position 26.
So far, I could only print the result:
awk '{if (substr ($ 1,1,26)! ~ / T /) print}' file.txt
How I can do to eliminate the lines that meet this condition?
Help please. ... (4 Replies)
Discussion started by: </kida>
4 Replies
6. Shell Programming and Scripting
hello everyone
my file contains many records, the following is a sample:
BEGIN
ASX1500000050002010120000000308450201012000177
ASX1100002000000201012000000038450201012000220
ASX1600100005000201012000000038450020101200177
ASX1900100006000201067000000058450020101200177... (2 Replies)
Discussion started by: neemoze
2 Replies
7. Shell Programming and Scripting
Hi folks,
I have a text file that I need to parse, and I cant figure it out. The source is a report breaking down softwares from various companies with some basic info about them (see source snippet below). Ultimately what I want is an excel sheet with only Adobe and Microsoft software name and... (5 Replies)
Discussion started by: rowie718
5 Replies
8. Shell Programming and Scripting
Hi All,
Can any1 help me out in broadcasting a message to all users if a condtion is meet.
Like I am trying to get values from a directory for service monitoring.
If a condition is meet it should broadcast the message.
I try to use wall command but i m not sure how its works as its... (1 Reply)
Discussion started by: jojo123
1 Replies
9. Shell Programming and Scripting
I have 2 pattern of lines (SQL query and Time taken)in a log i need to capture all SQL queries with time taken >20 sec and need to display as one line.
2 lines from log:
2007-10-23 11:39:17,061 DEBUG - SQL Query : SELECT A.GROUP_CD , C.FN_CD FROM UP_GROUP A , PRD_GROUP_TO_FN B , PRD_FN... (7 Replies)
Discussion started by: vithala
7 Replies
10. UNIX for Advanced & Expert Users
I have 2 pattern of lines (SQL query and Time taken)in a log i need to capture all SQL queries with time taken >20 sec and need to display as one line.
2 lines from log:
2007-10-23 11:39:17,061 DEBUG - SQL Query : SELECT A.GROUP_CD , C.FN_CD FROM UP_GROUP A , PRD_GROUP_TO_FN B , PRD_FN... (1 Reply)
Discussion started by: vithala
1 Replies