10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to read the log file which was generate from other command . And the output was having multi line in log files for job name and server name. But i need to make all the logs on one line
Source file
07/15/2018 17:02:00 TRANSLOG_1700 Server0005_SQL ... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
2. Shell Programming and Scripting
The four lines in the tab-delimeted input are a sample format from my actual data. The awk is meant to go line by line and check if a pattern is satisfied and if it is follow a particular format (there are 3). All the lines in the file should follow one of the three formats below. I added comments... (4 Replies)
Discussion started by: cmccabe
4 Replies
3. Shell Programming and Scripting
Hi All,
I have a data file (myfile.txt) as below:
- A H C
- A HHH F
- AAA HH I
The importan point is that the width between the columns are not fixed and the column seperator is space.
I wish to change the value of 4th column using awk only when $3 = HH. I can... (4 Replies)
Discussion started by: angshuman
4 Replies
4. Shell Programming and Scripting
Hi,
I was doing some research and can't seem to find anything. I'm trying to automate a process by creating a script to read a csv line and column and assigning that value to a variable for the script to process it.
Also if you could tell me the line and column if it's on another work ... (3 Replies)
Discussion started by: vpundit
3 Replies
5. Shell Programming and Scripting
# Print list of word frequencies
{
$0 = tolower($0)
for (i = 1; i <= NF; i++)
counter++
}
END {
for (word in counter)
printf "%s\t%d\n",word, counter
}
I have this simple awk code from awk user guide to count the frequency of word. Now consider the... (7 Replies)
Discussion started by: ajacobs365
7 Replies
6. Shell Programming and Scripting
hi ,
While working on perl, have to write a continuous log file which I can monitor. I tried like,
open (LOG,'>'.$log.'/Report_'.$todaysdate.'.log') or die("Unable to create the log file");
print LOG "\nDate : ".`date`;
But when I ran the script in backend and monitor log, it... (1 Reply)
Discussion started by: Deei
1 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
Just writing to ask if any one can advise on what tools to use best for maintaining your scripts ... preferably free/open source and portable if there is one, that is, one that can be placed and run on a USB stick ...
At the moment, am having them in directories and files and no... (2 Replies)
Discussion started by: newbie_01
2 Replies
8. Shell Programming and Scripting
Hi Experts,
I am adding a column of numbers with awk , however not getting correct output:
# awk '{sum+=$1} END {print sum}' datafile
2.15291e+06
How can I getthe output like : 2152910
Thank you..
# awk '{sum+=$1} END {print sum}' datafile
2.15079e+06 (3 Replies)
Discussion started by: rveri
3 Replies
9. Shell Programming and Scripting
HI guys,
I have created a script to read 1 column in a csv file and then place it in text file.
However, when i checked out the text file, it is not in a column format...
Example:
CSV file contains
name,age
aa,11
bb,22
cc,33
After using awk to get first column
TXT file... (1 Reply)
Discussion started by: mdap
1 Replies
10. Shell Programming and Scripting
Hi Folks,
I have a log file that keeps the information pn the date and time a specific transaction is firedup. I found that the log file keeps growing and I intend to limit the entry to the log file to 30 days.
Log file name is transaction.log, here is the content:
120802_23:47:37 ... (3 Replies)
Discussion started by: odogbolu98
3 Replies