I have the following script working fine, and need to generate a file delimiter (with tab or special character) for Excel data import. The script will run every hour in crontab to append the new rows to the delimiter, so that I can collect the data for i.e. a week, which will give me a lot of lines in the file.
This scripts gives me info like:
The format I like to is:
Before appending the rows to the file, I need to do some tweaks.
The paging space data is from lsps –s, so I need to awk:
They return with MB & %, so I need to remove MB & % for the smooth import to Excel.
Also, CPU count is from:
so, I need to remove “lcpu=” as well.
Please advise.
Thank you so much for your help.
Last edited by radoulov; 07-21-2011 at 04:38 PM..
Reason: Tags fixed.
Hi,
Extremely new to Perl scripting, but need a quick fix without using TEXT::CSV
I need to read in a file, pass any delimiter as an argument, and convert it to bar delimited on the output. In addition, enclose fields within double quotes in case of any embedded delimiters.
Any help would... (2 Replies)
Hi,
I need help with this-
input.txt :
L B white
X Y white
A B brown
M Y black
Read this input file and if 3rd column is "white", then add specific lines to another file insert.txt.
If 3rd column is brown, add different set of lines to insert.txt, and so on.
For example, the given... (6 Replies)
Hi,
I have a No Delimiter variable length text file with following schema -
Column Name Data length
Firstname 5
Lastname 5
age 3
phoneno1 10
phoneno2 10
phoneno3 10
sample data - ... (16 Replies)
Here is my source, i have million lines like this on a file.
disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=& drc=&mo=&sid=&lang=EN&loc=JPN
I want to split this into columns in order to load in database, anything starts with"&mjv=6" as first... (13 Replies)
Hi all,
I have a requirement to create a Header &Trailer for a file which is having 20 millions of records.
If I use the following method, i think it will take more time.
cat "Header"> file1.txt
cat Data_File>>file1.txt
cat "Trailer">>file1.txt
since second CAT command has to read all... (4 Replies)
Hi ,
I have a situation.
Need is to create & send a formatted file with header in BOLD & colored & some sequel results as a content.
I know echo -e \033 command, but its scope is limited in PUTTY.
How to retain the formatting out of Putty; say after someone opens a email attachment... (2 Replies)
Hi,
I need to append the data in to a file by using tab delimiter.
eg:
echo "Data1" >> filename.txt
echo "\t" >> filename.txt (its not working)
echo "Data2" >> filename.txt.
the result sould be like this.
Data1 Data2 (6 Replies)
hi
i have a function
printValues()
{
var=$#
count=0
qName=""
while
do
if
then
echo QManager Name $1
fi
if
then
echo Cluster Name$2
fi
if (( $count != 0 && $count != 1 ))
then
... (0 Replies)
Hi,
I am trying to append date in DAY_Mon_dd_yyyy at the end of a filename from cron.
Cron entry looks as below.
(script to execute) > test_file_`date +"a_%b_%d_%Y"`
File name created after executing the job is test_file_
I am expecting the filename to be something like ... (8 Replies)