Hi I Just updated to ubuntu 12.04 from 10 and the strange thing is that the window that says you have been upgraded didn't show up when I restarted my computer. And the other strange thing is that...
Type: Posts; User: toad3000; Keyword(s):
Hi I Just updated to ubuntu 12.04 from 10 and the strange thing is that the window that says you have been upgraded didn't show up when I restarted my computer. And the other strange thing is that...
When I want to read a file using a while loop all I do is just
while read line; echo $line done <$file
But I am unable to do something similar like this using a for loop.
for...
cool thanks! I didn't know that. you made the code a lot simpler to read.
because I tried many ways to accomplish this using a while loop and It wasn't working. I made a counter and I tried ${$counter} but I get bad substitutional error.
is it possible to accomplish this using a while loop?
I want to access each argument so I tried doing ${$counter2}} because that was my first intuition but I keep getting bad substitution error. Does anyone know how to do this?
typeset -i...
This is one of the examples I'm studying from
#!/bin/bash
#Source: countod
#read in a number of strings from user (until
#user enters END or end) and output the total
#number of strings...
I have a hunch that it means run this script first and use the variables but when I tried an example of my own it didn't work. Like I made a script with variables x=100. I made another script with...
Some example scripts I see on the top after #!/bin/bash I see #Source: ......
The .... contains just random words. I suppose they are other script names.
Thanks
wow thanks for those examples. I tried them and played with them a bit and I think i got the hang of it!
ahhh i created another post by mistake and don't know how to delete it.....
Oh I think i get it now.
So I guess in the future If I want to assign a value something I should not do it in a pipe stream I Guess? Like in the code I wrote before I was assigning 'a' a value...
My gosh! Thank you so much! This is exactly what I wanted! Thank you!!
if you could could you tell me whats wrong this the coded I wrote before
wc -l file | a= cut -d ' ' -f1
Hello I have some confusion.
wc -l ${list[$y]} | a= cut -d ' ' -f1a=$a+0
echo "$a --test a"
when I do this I am suppose to get a value for the variable a. And before this code I wrote...
Hey thanks a lot! I didn't know that read returns a true or false. Thank you. This clears up so much!
I'm having trouble with the read command. So I want to keep asking the user to keep entering values but once the user stops I have to stop.
I was thinking of doing while [ true ]
but then I need...
Does anyone know what this sed commands works. I keep looking at the man pages but I can't seem to find any info.
sed -e 'sx/..../..../xx
Let's just say .... and .... are some random words....
If one of my command requires a command line argument and the the person forget to type the argument when running, how do I specify the default argument in my script? Thanks
If I Make a file called "abc.xyz.adb", is the file valid? Meaning that is .adb really a valid extension for a file?
I see what you're saying there.
But it just it seems pretty tedious to say right the name of one column and press many space bars to right the name of the second column? Is there a way of doing...
No, I'm sorry I was pretty unclear.
I mean to make rows and columns with the echo command? Is that possible? Also is it possible to tell echo how many spaces I want between each word without...
I can't seem to figure out how finish off the last command
ls -p testfiles/ | more | grep "^d" | chmod 700
I want to change the permission on all the files/directories that start with a...
Is there any command I can use to make a text file that contains n number of columns and n number of rows?
Thanks.
Do you know any good forums people can discuss commands and such?
Thanks :)
Thank You! The -F command really works. I used it with the command I had previously. The full command I have is this.
ls -F | more | grep [A-Z]