10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I'm new to the forum and to bash scripting. I did some stuff with VB.net, Batch, and VBScripting in the past, but because I shifted over to Linux, I am learning to script in Bash at this moment. So bear with me if I seem to script like a newbie, that's just because I am ;-)
OK, I... (9 Replies)
Discussion started by: cornelvis
9 Replies
2. Shell Programming and Scripting
Hello all,
I am facing a weird issue while executing a code below -
#!/bin/bash
cd /wload/baot/home/baotasa0/sandboxes_finance/ext_ukba_bde/pset
sh UKBA_publish.sh UKBA 28082015 3
if
then
echo "Param file conversion for all the areas are completed, please check in your home directory"... (2 Replies)
Discussion started by: ektubbe
2 Replies
3. Shell Programming and Scripting
In the below perl executes if one file is processed perfect. However, when multiple files are processed in batch which is preferred I get the below error that I can not seem to fix it as the '' necessary for the command to execute, but seem to only work for one -arg option. Thank you :).
... (2 Replies)
Discussion started by: cmccabe
2 Replies
4. Shell Programming and Scripting
Hi everyone I'm new here so and I'm just starting to learn a bit of Solaris and I'm working on repairing 10 year old scripts for our system here at work.
When I execute the commands at my prompt everything go's through smooth. I'm using gedit to edit my code because I'm still getting used to the... (4 Replies)
Discussion started by: 82280zx
4 Replies
5. UNIX for Dummies Questions & Answers
Hey guys. Hopefully this is an easy one but having reference similar problems on the web I still can't fix it.
I am doing a recursive find and replace from a script. Of course I could just run the damn thing from the command line but it's bugging me now and want to get it working.
grep -rl... (4 Replies)
Discussion started by: anthonyjstewart
4 Replies
6. Shell Programming and Scripting
Hello,
So my knowledge of bash scripting is not that great and I have been trying to solve this problem on my own for awhile to no avail.
Here's the error I get when running it with an OS that uses bash 3.2.x:
testagain.sh: line 10: *-1: syntax error: operand expected (error token is... (2 Replies)
Discussion started by: forkandspoon
2 Replies
7. UNIX for Dummies Questions & Answers
I am using find to get all the instances of a given directory name, then remove those directories with a -exec rm command.
here is an example:
mkdir -p foo/bar
find foo -name bar -exec rm -rf {} \;
foo will get deleted as I desired, however this pops out on standard error:
find: foo/bar:... (3 Replies)
Discussion started by: Afifi
3 Replies
8. UNIX for Dummies Questions & Answers
Suppose you have a directory called "olddir" exists but no "newdir", you want to rename "olddir" to"newdir"
In previous versions (at least in 2.05b.0) of bash, you can try
mv olddir/ newdir/
OR
mv olddir/ newdir
But in new versions of bash, if you
mv olddir/ newdir/
BASH panics:
mv:... (5 Replies)
Discussion started by: meili100
5 Replies
9. Shell Programming and Scripting
#!/usr/bin/perl
open (DATA, file.txt);
@array = <DATA>;
close (DATA);
open (DATA, ">$file.txt");
for (@array) {
s/text/replace text/;
push(@contents,$_);
}
seek(DATA, 0, 0);
print DATA (@contents);
close(DATA);
could someone please explain how this works. i've been... (3 Replies)
Discussion started by: mjays
3 Replies
10. Shell Programming and Scripting
Hello all,
This beats me. I have a script that executes some commands and redirects their output to some text files that I will parse. The commands are along the lines of:
dsmadmc -id=admin -pa=admin -outfile=/home/tools/qlog.txt q log f=d
If I just run the script it works. If I execute... (2 Replies)
Discussion started by: Skovian
2 Replies