You could also replace the egrep and 2 awks above with this:
if field 4 matches <begining of string> 192 <dot> 168 <dot> <one-or-more-digits> <dot> <either "2<zero thru 5>" or "90"> <end of string>
then print field 4 <space> field 3
Last edited by Chubler_XL; 04-05-2011 at 08:48 PM..
This User Gave Thanks to Chubler_XL For This Post:
I have a command that when ran it will have an output such as
string LongerString
string2 longerString2
More MoreStrings
seperated by tabs. The command lists domains and their accounts set up in my server admin software (interworx).
The end result will be that it will run rsync for... (2 Replies)
How do i tell my bash shell script to test the output of the command i'm using?? I want this script to look for lines not equal to 1 then let me know..
$ cat blah ; echo ---- ; cat blah.sh
1 fe
1 fi
1 fo
0 fum
1 blahda
1 blah
0 blahh
1 bla
1 bl
1 blahhh
----
#!/bin/bash
while... (1 Reply)
Hi all. I am using procmail to deliver an email to a script I am developing. Procmail delivers the email to the script on standard input. I imagine this is the same as piping input from a command into the script. Hence I've been testing my script by running
echo 'test' | sms-autosend-backup.sh
... (2 Replies)
I am attempting to create a script that would allow me to list all the instances associated with a DB2 and then prompt the user to choose which one to issue the db2profile command against. I use the db2 command db2ilist to get a list of the instances for a particular server, but the number of... (1 Reply)
I am attempting to create a script that would allow me to list all the instances associated with a DB2 and then prompt the user to choose which one to issue the db2profile command against. I use the db2 command db2ilist to get a list of the instances for a particular server, but the number of... (7 Replies)
Okay, so I have a file containing line after line of three digit numbers. I need a script that does an action based on the last two numbers in this list.
So.... To get the last two numbers, I can have the script do
tail -2 filename.txt
But where I run into trouble is as follows. If... (6 Replies)
Hello.
This part of script do nothing but no complain.
Here the directory content :
The script run by root
cd /root
CMD="rmdir -p -v --ignore-fail-on-non-empty .ssh"
echo $CMD
$CMD
The ouput
linux:~/bin # ./test_05
rmdir -p -v --ignore-fail-on-non-empty .ssh
rmdir: removing directory,... (3 Replies)
Hi All,
Just have a requirement, I am executing a bash shell script, my requirement is to catch the pid and job name to a txt file in the same directory, is there anyway to do it? please help me out.
Regards
Rahul
---------- Post updated at 08:42 AM ---------- Previous update was at... (2 Replies)
Hello, I want to run a field from an awk command through a command in bash.
For example my input file is
1,2,3
20,30,40
60,70,80
I want tot run $2 thought the command
date +%d/%m/%y -d"01/01/15 + $2 days -1 day"
and get the output
1,02/01/15,3
20,30/01/15,40
60,11/03/15,80
... (2 Replies)
I want to run commands inside a bash script.
An example is
I want to pass the command in a string as regexp as an argument to the script, then run sed on the bash variable
sed.sh regexp
sed.sh "-i \"s/<p>//g\""
then call
sed "$regexp" $fl (3 Replies)
Discussion started by: Kangol
3 Replies
LEARN ABOUT OPENSOLARIS
lpsystem
lpsystem(1M) System Administration Commands lpsystem(1M)NAME
lpsystem - register remote systems with the print service
DESCRIPTION
The lpsystem command is obsolete, and could be removed at any time. The print system no longer uses the information generated by lpsystem.
See lpadmin(1M), lpusers(1M) or printers.conf(4) for equivalent functionality.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWpcu |
+-----------------------------+-----------------------------+
|Stability Level |Obsolete* |
+-----------------------------+-----------------------------+
* This command could be removed at any time.
SEE ALSO lpadmin(1M), lpusers(1M), printers.conf(4), attributes(5)SunOS 5.11 19 Feb 1999 lpsystem(1M)