9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all,
I am trying to make a script that will apply a substitution to any number of files given on the command line.
Example would be
~/Unix/script/subst car boat myFile1.txt myFile2.txt myFile3.txt
This is the code I have so far but it does not function as needed.
PAT=$1
shift... (10 Replies)
Discussion started by: ramn214
10 Replies
2. UNIX for Dummies Questions & Answers
I have a basic tail/grep question. I have logs that are generated & kept in a directory called alert_audit. I am using "tail" to see the logs that are coming in, but I only need logs that contain the IP address 10.249.185. or 10.247.231.
Here is the command I have, but it pulls all IP... (3 Replies)
Discussion started by: robertson1995
3 Replies
3. Shell Programming and Scripting
Hi,
I have a small requriement to change a part of string in a sentence starting with "ho".
For E.g I am having the following statements:
I want to go to home,beach.
I will never go to that horrible,place.
Now I want to replace the string starting with "ho" in the above 2... (3 Replies)
Discussion started by: yoursdavinder
3 Replies
4. Shell Programming and Scripting
Hi All,
I have a total of ten file to open in the Perl script and i am using a for loop to open each file and capture some strings inside each file.
Unfortunately, i encounter the below syntax error.
I think there should be something wrong with this term reports_${counting}_${_}.txt but i do... (4 Replies)
Discussion started by: Raynon
4 Replies
5. Shell Programming and Scripting
Hello -
I am running Linux. I want to place a comment char at the beginning of a line in a file. For example:
testvar=`grep username /etc/people
sed -e 's/$testvar/#$testvar/g' /etc/people
I cannot get the above commands to put a comment at the beginning of the line.
Any... (3 Replies)
Discussion started by: mlike
3 Replies
6. Solaris
Hi all,
I need to place a custom configuration file for a script/program that will likely be sitting in /usr/sbin, but I am unsure of exactly where to place it. In RHEL was told the config file should be in /etc/sysconfig, but no such directory exists in Solaris. Will my config file simply sit... (5 Replies)
Discussion started by: Rocket2DMn
5 Replies
7. Shell Programming and Scripting
Hi,
I would like to get 5th field from this output using FS.
Filesystem 1024-blocks Used Available Capacity Mounted on
172.29.138.222:/vol/vol0 311936256 2565248 309371008 1% /tmp/test
My command is
df -kP | awk ' BEGIN { FS="" ; } { print $5 ; } '
For some... (5 Replies)
Discussion started by: phamp008
5 Replies
8. Shell Programming and Scripting
Hiya I am fairly new to UNIX and have been asked to write some scripts....
I am working in the korn shell. What I am trying to do is to go through a delimited file:
Testingline1;test;test
Testingline2;test;test
and place the lines into an Array so:
Array = Testingline1;test;test
Array... (4 Replies)
Discussion started by: ThomasvdH
4 Replies
9. Cybersecurity
Hello,
i have some troubles with someone who keeps posting porno links on my website ;)
I warned him because of it but since he only seems to like the attention i wanted to give him an IP ban. Anyone knows how i can place an IP ban with telnet on my unix server? (3 Replies)
Discussion started by: Martijn v/d Meu
3 Replies