10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to divide the number of white spaces by total number of characters in a file using bash. I am able to get the number of white spaces correctly using:
tr -cd “” < afile | wc -c
I am also able to get the total number of characters using:
wc -c afile
How do I divide the first... (2 Replies)
Discussion started by: ngabrani
2. Shell Programming and Scripting
I have a file (main.lst) containing a list of dates in DDMMYYYY format. The dates will mostly be the same but it is possible to have multiple dates and these need not be in chronological order. I have another file containing another list of dates (holidays.lst).
The task is to get the latest... (5 Replies)
Discussion started by: elixir_sinari
3. Post Here to Contact Site Administrators and Moderators
Date Arithmetic with the Shell
has link of
www samag com/documents/s=8284/sam0307b/0307b.htm
which is no longer.
Is this the correct place to post this?:confused:
and I got message... (1 Reply)
Discussion started by: dgerman
4. Shell Programming and Scripting
I need to process a file which contains below data. Usually the files contains both Start and Finish time. but for Few records, it contains only Start. For those records I need to add the finish line by adding 5 minutes to Start time.
Started BBIDX Tue Jun 1 15:15:11 EDT 2010 292308... (1 Reply)
Discussion started by: siba.s.nayak
5. UNIX for Dummies Questions & Answers
I'd like to know how to perform arithmetic on multiple files. I have got many tab-delimited files. Each file contains about 2000 rows and 2000 columns.
What I want to do is to to sum the values in each row & column in every file.
The following explains what I want to do;
... (9 Replies)
Discussion started by: Muhammad Rahiz
6. Shell Programming and Scripting
please advise on shell script to add two time stamps
for example :
please help me to find shell script to add to two time stamps, as i need to convert time from EST to GMT or SST to prepare status of jobs in unix and to specify estimated time to... (3 Replies)
Discussion started by: balireddy_77
7. Shell Programming and Scripting
I would appreciate if anyone knows how to perform adding to date.
As for normal date, i can easily plus with any number.
But when it comes to month end say for example 28 Jun, i need to perform a plus with number 3, it will not return 1 Jul.
Thanks in advance for your help. (4 Replies)
Discussion started by: agathaeleanor
8. Shell Programming and Scripting
I am trying one very simple thing I could not find anything on google..
I have 2 integer variable..and I need to do division...in ksh
where $catch and $num are integer variable..
I tryed with this:
printf "%0.2f" $final=$catch/$num
but it does not work..
any help is... (12 Replies)
Discussion started by: amon
9. UNIX for Dummies Questions & Answers
i am used to making scripts for hp-ux. but lately i tried to make some for solaris. the problem is that when i tried to execute it it gave me an error the "let: not found". why is that? how can i perform an arithmetic function in the solaris shell script?
thanks :) (2 Replies)
Discussion started by: inquirer
10. UNIX for Advanced & Expert Users
Can anyone help please. I am writing a kourne shell script and I am unsure how to do the following:
I have extracted a time string from a logfile, and I have another time string I want to compare it to to see if it's later than the time I'm comparing with.
i.e. expectedSLA="23:00:00", ... (2 Replies)
Discussion started by: csong2