Search Results

Search: Posts Made By: Poison Ivy
2,973
Posted By Poison Ivy
or u could use if [ "$adfdf" == "y" -o...
or u could use

if [ "$adfdf" == "y" -o "$adfdf" == "Y" ]; then
echo good
fi
3,609
Posted By Poison Ivy
i've decided to stick with this but I still need...
i've decided to stick with this but I still need the answer to this qeustion :(
3,609
Posted By Poison Ivy
Thanks! it runs now, but the results are not what...
Thanks! it runs now, but the results are not what I expected :S am i passing the arguments in the wrong way? it just prints out first level and second levels deep in subdirectory and keeps printing...
3,609
Posted By Poison Ivy
I've decided to stick with my own code cos it...
I've decided to stick with my own code cos it needs to have loops and functions and the oneliner code (as good as it is) doesnt

I'm not familiar with use of method functions so I wrote this but it...
3,609
Posted By Poison Ivy
find . -type d -print | sed -e...
find . -type d -print | sed -e 's;[^/]*/;|--;g;s;--|; |;g'

works wonderfully thanks!

now here's how it appears:

.
|--lower.sh
|--guess.sh
|--dir
| |--one-file
| |--one-file.2
| ...
3,609
Posted By Poison Ivy
printing directories
hi guys i'm trying to make a script that prints out a specified directory as some sort of tree, it prints out ok but i need it to print out every subdirectory within the directory but i'm not sure...
21,001
Posted By Poison Ivy
Thanks ^_^
Thanks ^_^
21,001
Posted By Poison Ivy
checking a variable is within range
how can i check that a variable is between 0-100, like if i ask a user to input a number between 1-100 and i want to excute commands WHILE that number is between that range or else i will keep asking...
Forum: Programming 08-16-2006
7,163
Posted By Poison Ivy
im kinda new to this so umm what do u mean :o
im kinda new to this so umm what do u mean :o
Forum: Programming 08-16-2006
7,163
Posted By Poison Ivy
at the top *firstFree = heap is suppose to make...
at the top *firstFree = heap is suppose to make heap point at the first value right? then later on i change the address of firstFree so it points at first free memory space.. so i'm wanting that...
Forum: Programming 08-16-2006
7,163
Posted By Poison Ivy
this is still not working :( i get an empty line
this is still not working :( i get an empty line
Forum: Programming 08-16-2006
7,163
Posted By Poison Ivy
i'm trying to print out the content of the memory...
i'm trying to print out the content of the memory from the beginning up till the first free space which i have firstFree to, so i'm kinda trying to print out heap[0] to heap[firstFree address]
Forum: Programming 08-16-2006
7,163
Posted By Poison Ivy
char heap[ 134 ]; char *firstFree = heap; ...
char heap[ 134 ];
char *firstFree = heap;

char *allocMem( int size ) {
if ( size >= 0){
void *malloc(size_t sizeofint);
/*allocate space for an array...
Forum: Programming 08-16-2006
7,163
Posted By Poison Ivy
no not the string length but the address of the...
no not the string length but the address of the firstFree (like the heap[] address 0, 1, 2 etc ...)
Forum: Programming 08-16-2006
7,163
Posted By Poison Ivy
Thanks nathan, it worked, but now I'm trying to...
Thanks nathan, it worked, but now I'm trying to print all the content of the memory and this isn't printing it, I don't see where I'm going wrong :(

char letter;
int counter = 0;
int...
Forum: Programming 08-16-2006
7,163
Posted By Poison Ivy
warning: assignment from incompatible pointer...
warning: assignment from incompatible pointer type

What should i do?
Forum: Programming 08-15-2006
7,163
Posted By Poison Ivy
address of pointer
Hi i'm new to c programming and i'm trying to change the address of a pointer/variable but i can't seem to get it right,

I have this

char heap[ 134 ];
char *firstFree = heap;
char *allocMem(...
5,754
Posted By Poison Ivy
I figured it out using the awk command :D thanks...
I figured it out using the awk command :D thanks for all your help guys
5,754
Posted By Poison Ivy
that seems to give the same answer as wc -l * |...
that seems to give the same answer as wc -l * | sort -nr | head -2 | tail -1 without an extra space at the beginning :S
4,403
Posted By Poison Ivy
that's good actually but what i meant was to...
that's good actually but what i meant was to include words such as she's as 4 letter word etc..
4,403
Posted By Poison Ivy
umm sorry i dont know what u mean lol im very new...
umm sorry i dont know what u mean lol im very new to unix :o
4,403
Posted By Poison Ivy
using Grep
I'm trying to figure out what command I would enter in to get all 4 letter words (only a-z characters, punctuations should not be counted as a letter)

I have this so far:
cat...
5,754
Posted By Poison Ivy
Sorry but is there a way for this to work with...
Sorry but is there a way for this to work with files names that have spaces?
5,754
Posted By Poison Ivy
awk '{print $2}' works perfect!! thanks! :D ...
awk '{print $2}' works perfect!! thanks! :D

I used *.* cos I wanted only files and not subdirectories otherwise I'd get a
wc: blabla: Is a directory
5,754
Posted By Poison Ivy
The Cut command
Hi I'm a newbie to unix and I have a dumb question concerning cutting

I'm trying to write up a shell pipeline that will print the name of the file containing the most lines in the current...
Showing results 1 to 25 of 25

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