10 More Discussions You Might Find Interesting
1. Programming
So, I'm into about 650 lines of some code I'm working on. So I'll try to explain instead of flooding this post. Say I have some code like this:
int main() {
int i, j;
char data;
printf("Gimme something: ");
fgets(data, INPUT_BUFF, stdin);
for (j = 0; j < data; j++){... (6 Replies)
Discussion started by: Azrael
6 Replies
2. Shell Programming and Scripting
Hello,
Is ther any way to run a loop which promt an echo"waiting for user to hit ENTER"
sleeps for an iterval and once user hit the ENTER key the loop exit and the script continue to the next stage?
I need this ASAP !!!
Thanks!! (9 Replies)
Discussion started by: LiorAmitai
9 Replies
3. Programming
In the book "The C programming language"; second edition, chapter 2.7 there is a snippet which is supposed to:
"convert a string of digits into its numeric equivalent".
int atoi(char s)
{
int i, n;
n = 0;
for ( i = 0; s >= '0' && s <= '9'; ++i)
n = 10 * n + (s -... (4 Replies)
Discussion started by: tornow
4 Replies
4. Shell Programming and Scripting
Hello All,
I have a requirement to convert a 12 hour format to 24 hour time format and the sample input /out put is below
Input Time format : Nov 2 2011 12:16AM
Out Put Format : Nov 2 2011 0:16
Input : Nov 2 2011 4:16PM
Out Put: Nov 2 2011 16:16
I have done this using a... (6 Replies)
Discussion started by: jambesh
6 Replies
5. Shell Programming and Scripting
Hi,
Simple question :
How to find the value type from a variable :
Ex : var="1" => type is numeric
var="a" => type is character
Thx :D (3 Replies)
Discussion started by: madmat
3 Replies
6. Shell Programming and Scripting
Hi,
I have a file containing timestamp( Example given below). How can i get date(mmd-dd-yyyy) from it?
($> cat file1.txt
2008-11-24 05:17:00.7043)
Thanks,
Sri (2 Replies)
Discussion started by: srilaxmi
2 Replies
7. Shell Programming and Scripting
Hello Everyone,
I have this code misbehaving in one of my scripts, I have a var containing the sequential number of the day for the year and I am suppose to get the regular date for that day and its weekday.
If I set the day to 273 I get back 2008/09/31 which is not a proper date.
can you help... (7 Replies)
Discussion started by: gio001
7 Replies
8. UNIX for Advanced & Expert Users
Could someone please advise, what's the best way to changing the shell type from sh to ksh.
When I login into a unix server it takes you directly to sh, is there a way of amending the .profile to use ksh instead. Or is there some other way ?
Ideally it would be good to be done from the login... (10 Replies)
Discussion started by: venhart
10 Replies
9. Shell Programming and Scripting
Hi all,
New to ksh and had a few questions to see if this is doable in ksh or if I am going to have to call out to a tcl procedure. I have an Ascii file I want to convert to hex then search and remove all hex chars '0A' and then convert back to Ascii. Here is an example of an Ascii file I am... (2 Replies)
Discussion started by: hgjdv
2 Replies
10. Shell Programming and Scripting
Having been a long-time csh person I now need to convert a lot of stuff to run under ksh. Can anyone tell me how to do a ksh equivalent of the csh history substitution !* that can be used in an alias, ie how would I do:
alias cd "cd \!*; pwd"
alias find "find . -name... (2 Replies)
Discussion started by: jonnywilkins
2 Replies