Forum: Shell Scripting Sep 17th, 2009 |
| Replies: 4 Views: 503 > Now I want a shell script to automate this process.
Give us an idea of the kinds of repetitive commands you type in (and as skanke points out - which machine you type them on).
Perhaps then,... |
Forum: Shell Scripting Sep 15th, 2009 |
| Replies: 4 Views: 492 http://clusty.com/search?query=excel+vba&sourceid=Mozilla-search |
Forum: Shell Scripting Sep 14th, 2009 |
| Replies: 3 Views: 425 Lemme put it this way, I give you an answer.
33% chance you don't understand the answer at all
33% chance that you know it already
33% chance that there is something useful.
If you want to play... |
Forum: Shell Scripting Sep 13th, 2009 |
| Replies: 3 Views: 425 How are we supposed to help, when you don't show what you're capable of doing yourself.
> plz just dont refer the man pages of linux plz
Why not? Sooner or later, you'll have to get to grips... |
Forum: Shell Scripting Sep 8th, 2009 |
| Replies: 1 Views: 469 Well you'll need to call chdir() in the current process.
Each process has it's own "cd", so calling a process to change the current directory will only have a limited and local effect. |
Forum: Shell Scripting Sep 1st, 2009 |
| Replies: 3 Views: 553 Looks like you've got a crappy date then, and you need to use the perl way you know. |
Forum: Shell Scripting Aug 26th, 2009 |
| Replies: 3 Views: 553 $ date '+%m/%d/%Y':'%H:%M:%S' ; date --date='now -5 minutes' '+%m/%d/%Y':'%H:%M:%S'
08/26/2009:18:25:41
08/26/2009:18:20:41 |
Forum: Shell Scripting Aug 26th, 2009 |
| Replies: 1 Views: 647 Well how do you run a single test case at the moment?
How do you run several test cases? Is it typing in a somewhat repetitive command?
Post some examples. |
Forum: Shell Scripting Aug 26th, 2009 |
| Replies: 3 Views: 1,185 And how much time have you spent reading manuals, trying things etc? |
Forum: Shell Scripting Aug 26th, 2009 |
| Replies: 4 Views: 609 Use a different separator.
Eg.
sed -e "s@DATEST\@$DATESTART@g"
I can't figure out where the real separator is in the middle of the expression.
But you get the idea. |
Forum: Shell Scripting Aug 25th, 2009 |
| Replies: 4 Views: 609 sed -e "s/DATEST\/08/25/2009:07:41:41/g"
One or more of the / in your dates needs escaping. |
Forum: Shell Scripting Jul 18th, 2009 |
| Replies: 2 Views: 774 Step 1
MPUSED=`lsof | grep $MOUNT | awk '{print $2}' | sort -u`
This makes sure that each PID which might have open files is captured only once.
Step 2
Then do
for i in $MPUSED; do |
Forum: Shell Scripting Jul 7th, 2009 |
| Replies: 5 Views: 704 I take the reference in your first post is for this?
http://www.polarcloud.com/tomato
First, do you have a complete bash, or is that a cut-down version as well?
The answer (maybe) to the first... |
Forum: Shell Scripting Jun 28th, 2009 |
| Replies: 4 Views: 865 > #include "/home/yourdir/myInclude/header.sh"
Don't do this.
Absolute paths to header files are a disaster waiting to happen.
If you reorganise your workspace, or give the code to someone else,... |
Forum: Shell Scripting Jun 27th, 2009 |
| Replies: 1 Views: 379 Windows comes with a "Task scheduler" which can be used for this. |
Forum: Shell Scripting Jun 17th, 2009 |
| Replies: 5 Views: 842 > i actually FTP a compressed file from UNIX to Windows server
Did you use binary mode for the FTP transfer? |
Forum: Shell Scripting Jun 16th, 2009 |
| Replies: 5 Views: 704 Is your next question going to be
"How do I do x in shell"
where x is some perl statement involving the USE of $dgs ?
There must be a reason for opening the port, which means there's going to be... |
Forum: Shell Scripting May 29th, 2009 |
| Replies: 2 Views: 1,404 Use a while loop and the 'shift' method to process each argument in turn.
Use http://software.frodo.looijaard.name/getopt/ |
Forum: Shell Scripting May 21st, 2009 |
| Replies: 1 Views: 852 So what have you done so far?
Try this at the command prompt
for /?
The perhaps
if /?
mkdir /? |
Forum: Shell Scripting May 19th, 2009 |
| Replies: 2 Views: 997 If you have a line
"their therapist is over there"
and you're searching "the", what would you want
0 - nothing matches the actual word "the"
1 - the line contains "the" somewhere
3 - there are... |
Forum: Shell Scripting May 18th, 2009 |
| Replies: 2 Views: 469 Case labels are basically simple regex's.
So you might be able to do this
[0-4]*) echo "F”;;
5*) echo "D”;;
6*) echo "C”;;
7*) echo "B”;;
[89]*) echo "A”;; |
Forum: Shell Scripting May 15th, 2009 |
| Replies: 3 Views: 821 You mean put the current working directory into the prompt "like DOS" ?
Or just type
pwd |
Forum: Shell Scripting May 13th, 2009 |
| Replies: 8 Views: 822 So change the name in the find command. |
Forum: Shell Scripting May 12th, 2009 |
| Replies: 8 Views: 822 Well you could read the intro guides on how to post code, perhaps format the script so it's easier to read.
As opposed to one massive 1-liner which no-one wants to look at at all. |
Forum: Shell Scripting May 9th, 2009 |
| Replies: 2 Views: 542 http://www.rt.com/man/chmod.1.html |
Forum: Shell Scripting May 8th, 2009 |
| Replies: 2 Views: 541 Piping works, if you can do this
open -e
/path/to/file
That is, if you just type in the "open -e", it gives you some kind of prompt for a filename.
If it doesn't do that, then piping... |
Forum: Shell Scripting May 6th, 2009 |
| Replies: 1 Views: 352 |
Forum: Shell Scripting May 5th, 2009 |
| Replies: 3 Views: 465 Well you could have used code tags. |
Forum: Shell Scripting Mar 5th, 2009 |
| Replies: 6 Views: 1,114 You seem to be managing at the moment.
Keep digging away at it :) |
Forum: Shell Scripting Feb 27th, 2009 |
| Replies: 6 Views: 1,114 Well it's where I would start looking, if that's any use to you. |
Forum: Shell Scripting Feb 26th, 2009 |
| Replies: 2 Views: 376 http://bashdb.sourceforge.net/bashdb-man.html
By convention, a -- option turns off all further option processing, and treats the rest of the command line as parameters. |
Forum: Shell Scripting Jan 28th, 2009 |
| Replies: 7 Views: 2,114 The shell will allow you to create multi-line awk programs, which in this case would allow you to only read the file once, AND be sure that the $4 you see printed is the $4 being summed.
awk... |
Forum: Shell Scripting Jan 27th, 2009 |
| Replies: 7 Views: 2,114 Strange, that would have worked - post your latest code. |
Forum: Shell Scripting Jan 26th, 2009 |
| Replies: 7 Views: 2,114 I would have hoped after 40 posts that you would have figured this out.
Or at least read it.
http://www.daniweb.com/forums/announcement113-3.html |
Forum: Shell Scripting Jan 25th, 2009 |
| Replies: 5 Views: 675 Why do you need the password?
The easiest way to get the password is to ask the user for it, and explain why you need it.
passwords are usually stored as hashes (a one-way function).... |
Forum: Shell Scripting Jan 20th, 2009 |
| Replies: 4 Views: 1,458 Just put
ls
in there for now.
It's not magic, it's just a list of commands you want done every time you either login or create a new shell. |
Forum: Shell Scripting Jan 20th, 2009 |
| Replies: 6 Views: 876 We're only going to throw you so many bones before we expect you to start reading the manuals and figuring out how to do this stuff.
In fact, just go read the manuals. No, you won't remember the... |
Forum: Shell Scripting Jan 20th, 2009 |
| Replies: 6 Views: 876 |
Forum: Shell Scripting Jan 20th, 2009 |
| Replies: 4 Views: 1,458 Copy the example dot.bash_profile to your home directory as .bash_profile
Then start uncommenting the bits you would like, and adding any new things you would like. |
Forum: Shell Scripting Jan 18th, 2009 |
| Replies: 5 Views: 747 Yes, you're using tr wrongly.
tr just translates (or deletes) characters. Not lines, or things matching lines.
You could try
grep -v $remEmp $dataFile > temp
mv temp $dataFile
which finds... |