10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
Can anyone help me how do perform below requirement in unix.
Step1:we will receive multiple files weekly with same name(as below) in a folder(In folder we will have other files also def.dat,ghf.dat)
Filenames:
1) abc_20171204_052389.dat
2)abc_20171204_052428.dat
DON'T modify... (23 Replies)
Discussion started by: sunnykamal59
23 Replies
2. Shell Programming and Scripting
Semi-newbie, so flame throwers to 'singe-only', please. ;-)
I have a large number of (say) .html files, where I'd like to do a recursive in-place search and replace a particular string. The following bit of perl works fine:
perl -pi -e 's/oldstring/newstring/g' `find ./ -name *.html`
... (2 Replies)
Discussion started by: johnny_canucl
2 Replies
3. Shell Programming and Scripting
Hi Guy's.
Hopefully someone can help me with what I am trying to archieve.
So situation currently is, I have a script already setup however I have another script that sits infront of it.
The main script basically goes and searchs multiple platforms for a list of entered data.
In... (10 Replies)
Discussion started by: mutley2202
10 Replies
4. Shell Programming and Scripting
Could someone help me with the script below?
I am trying to make a script having just one arguement as a command and then it executes the appropriate code
#!/bin/bash
if
then
echo "Available commands:"
echo "./exec.sh cmd1"
echo "./exec.sh cmd2"
elif
then
cmd1 =... (1 Reply)
Discussion started by: spiridakos
1 Replies
5. Shell Programming and Scripting
Hi,
I have a shell script, when run it i get a prompt to enter arguments say 1 for doing my next task otherwise q for quit.
What I am trying to do is run the shell script with the argument passed in however it does not seem to work.
This is what I did
./test.sh 1
Instead it printed the line... (6 Replies)
Discussion started by: aqua9
6 Replies
6. Shell Programming and Scripting
Hello,
I have to make a shell script doing that :
the program tests if there is an argument, if there is it checks whether this is a directory or not, If it is it opens it.
for any .c file in the directory it prints 2 lines in the screen :
the dependence line of the .o and compiler commend... (1 Reply)
Discussion started by: dekl
1 Replies
7. Shell Programming and Scripting
Hi,
I have a my script here--
print "The Perl Script does the User health check and system health check...\n";
print "---------------------------------------------------------------------\n";
# use strict;
my($OS);
$OS = $^O;
# need to test @ARGV before GetOptions shifts it
if (@ARGV... (1 Reply)
Discussion started by: namishtiwari
1 Replies
8. Shell Programming and Scripting
I'm trying to write a script that accepts both arguments and options, e.g.
./script -h 1 -m 15 -s 30
or
./script
-h 1 -m 15 -s 30
I'd like for any of the arguments and options to be optional, and the option values should be numerals only. I've tried both getopt and getopts but I... (1 Reply)
Discussion started by: Ilja
1 Replies
9. Shell Programming and Scripting
Hi there,
It's pretty hard for me to explain my problem because I'm affraid I'm not using the correct vocabulary. So let me describe the situation. I wrote a script that has one argument. It works like this:
~$ cat /usr/local/bin/squote
echo "$@" | sed 's/'\''/'\''\\'\'\''/g; s/.*/'\''&'\''/g'... (2 Replies)
Discussion started by: chebarbudo
2 Replies
10. Shell Programming and Scripting
I've written a script (bgrep) for a more advanced grep command (& attached a cut down version below). I'm trying allow all grep options to be used, or in any combination.
The script works fine if I type say
bgrep -i -files product
it will return a non-case sensitive list of matches for... (3 Replies)
Discussion started by: Kevin Pryke
3 Replies