10 More Discussions You Might Find Interesting
1. Programming
Can someone outline the "best practice" (if any!) to handle newline in ANSI-C standard library functions?
I had some confusion with these functions recently related to char array and char pointer.
puts(), printf(), strcpy(), strncpy(), memset().
I seem to understand their basic use, but got... (6 Replies)
Discussion started by: yifangt
6 Replies
2. Shell Programming and Scripting
I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line
if
then... (8 Replies)
Discussion started by: saku
8 Replies
3. UNIX for Dummies Questions & Answers
Hey I have a question....
what is the difference between using == vs -eq when testing in WHILE loops.
I use the following test that only worked with == signs....
if
why do i need == and not -eq?
2. I need to re-use some code in a couple places in this script. is functions my best... (5 Replies)
Discussion started by: danieldcc
5 Replies
4. Shell Programming and Scripting
I need to run a cronjob and in the cronjob I execute a script that if there is an error produces standard error so I do
/RUNMYSCRIPT 2> mylogfile.log
However, if it runs correctly, I don't get a standard error output, I get a standard out output. How do I redirect both standard error and... (2 Replies)
Discussion started by: guessingo
2 Replies
5. UNIX for Dummies Questions & Answers
Hey, I'm completely new at this and I was wondering if there is a way that I would be able to redirect the log files in a directories standard output and standard error into and excel spreadsheet in anyway?
Please remember don't use too advanced of terminology as I just started using shell... (6 Replies)
Discussion started by: killaram
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am exploring with defining functions in my BASH shell scripts. However, I am bit confused about how to pass parameters to my functions. I was under the impression that you must do something like the following:
Define a function called "sample_function":
function sample_function {... (3 Replies)
Discussion started by: msb65
3 Replies
7. Shell Programming and Scripting
Hi there
how can i get the result of a command to not give me its error. For example, on certain systems the 'zfs' command below is not available, but this is fine becaues I am testing against $? so i dont want to see the message " command not found" Ive tried outputting to /dev/null 2>&1 to no... (5 Replies)
Discussion started by: hcclnoodles
5 Replies
8. Programming
Hi everybody,
first of all i apologize if my thread's title doesn't make much sense,but i coudn't find a more appropriate name :)
Then i apologize about my question,which probably will sound trivial for you :) :)
I am working on a program which is being tested in Linux but the final target is... (2 Replies)
Discussion started by: Zipi
2 Replies
9. UNIX for Advanced & Expert Users
Dear all,
I have a need to find the standard of my system such as POSIX.
How can I know that. Is there any way to find it.
I am using GNU/Linux. (2 Replies)
Discussion started by: nagalenoj
2 Replies
10. Shell Programming and Scripting
Hi
my shell is tcsh
can I have functions in my shell scripting?
Is the below shell script correct.
Can I have two functions and call one of them as required.
----------
echo "functions"
f1
f1 ()
{ echo "hello" }
f2 () (1 Reply)
Discussion started by: amitrajvarma
1 Replies