Search Results

Search: Posts Made By: console
Forum: Programming 12-06-2012
1
Dir
1,225
Posted By Scott
I am not satisfied that this is not homework. ...
I am not satisfied that this is not homework.

Please do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum...
Forum: Programming 12-05-2012
1,284
Posted By Corona688
#include <stdio.h> int main(void) { ...
#include <stdio.h>

int main(void)
{
char buf[512];
int a, b, c, d;

FILE *fp=popen("/sbin/ifconfig eth0", "r");

if(fp == NULL) return(1);

...
Forum: Programming 12-05-2012
1,940
Posted By vistastar
you need: myfile.getline(number,25); and atoi().
you need:
myfile.getline(number,25); and atoi().
Forum: Programming 12-04-2012
1,113
Posted By Scott
Do not post classroom or homework problems in the...
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum (https://www.unix.com/homework-coursework-questions/) under special...
1,717
Posted By pamu
change your code to read file touch $fileIf...
change your code to
read file
touch $fileIf file is already present how you can make new file with same file name.
You should decide either you want create new file or append data into old file.
...
1,717
Posted By Joseph_TKLee
I have tested it below # ./test.sh aaaa ...
I have tested it below
# ./test.sh
aaaa
./test.sh: line 2: -e: command not found
NO SUCH FILE
# vi test.sh
# ./test.sh
asdfa
NO SUCH FILE
# cat test.sh
read file
if [ -e "$file" ]
then...
1,717
Posted By pamu
it should work.. Please check.. $ cat...
it should work..
Please check..

$ cat file2
read file
if [[ -e "$file" ]]
then
echo "asfsafafa"
else
echo "NO SUCH FILE"
fi$ sh file2
file
asfsafafa

$ sh file2
no_file
NO SUCH FILE...
1,717
Posted By Joseph_TKLee
The following need to be modified. if (-e...
The following need to be modified.
if (-e "$file") ==> if [ -e $file ]

Cheers,
1,188
Posted By pamu
Please use code tags for code and data sample. ...
Please use code tags for code and data sample.

I don't think so..

How come sed -e 's/console/raw/g' will replace pradeep with rawat..???:confused:

for multiple simultaneous substitution...
1,188
Posted By elixir_sinari
Please use code tags. Also, please use more...
Please use code tags.
Also, please use more descriptive titles for your threads.

I see neither pradeep nor rawat in the script. Please copy/paste intelligently.

May be you need this:
sed -e...
Forum: Programming 01-20-2006
233,885
Posted By blowtorch
Trying to read from an illegal memory location...
Trying to read from an illegal memory location will cause this fault. i.e.
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 05:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy