10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am using a same printer vendor for 2 printer. Some of them dont have just default name with a full name of that printer.
for example
# lpstat -a | awk '{print $1}'|grep CITIZEN
CITIZEN
CITIZEN-T-S851II
This first one CITIZEN is a part of script
if grep -q S310II /etc/cups/printers.conf;... (10 Replies)
Discussion started by: tomislav91
10 Replies
2. Shell Programming and Scripting
All,
I'm getting a list like the following and I'd like to kill each PID in turn.
pid (17797)
pid (21748)
pid (21754)
pid (21704)
pid (2199)
pid (2159)
pid (17809)
pid (21769)
pid (21778)
pid (21715)
... (3 Replies)
Discussion started by: ejianu
3 Replies
3. Answers to Frequently Asked Questions
Regularly we have questions like: i have an XML (C, C++, ...) file with this or that property and i want to extract the content of this or that tag (function, ...). How do i do it in sed?
Yes, in some (very limited) cases this is possible, but in general this can't be done. That is: you can do... (0 Replies)
Discussion started by: bakunin
0 Replies
4. Shell Programming and Scripting
{
"AFafa": "FAFA","AFafa": "FAFA"
"baseball":"soccer","wrestling":"dancing"
"rhinos":"crocodiles","roles":"foodchain"
}
I need to insert a new line before the closing brackets "}" so that the final output looks like this:
{
"AFafa": "FAFA","AFafa": "FAFA"... (6 Replies)
Discussion started by: SkySmart
6 Replies
5. Shell Programming and Scripting
Hi,
I have file in my $datadir as below :-
SAT_1.txt
SAT_2.txt
BAT_UD.lst
BAT_DD1.lst
DUTT_1.txt
DUTT_la.txt
Expected result :-
should get all the above file in $<Filename>_file.lst
Below is my code :-
for i in SAT BAT DUTT
do
touch a.lst
cd $datadir (1 Reply)
Discussion started by: satishmallidi
1 Replies
6. Shell Programming and Scripting
I want to match the number exactly from the variable which has multiple numbers seperated by pipe symbol similar to search in egrep.below is the code which i tried
#!/usr/bin/perl
my $searchnum = $ARGV;
my $num = "148|1|0|256";
print $num;
if ($searchnum =~ /$num/)
{
print "found";
}... (2 Replies)
Discussion started by: kar_333
2 Replies
7. Shell Programming and Scripting
HI I am executing faloowing commands.
mr batch_1 > my_temp.txt ;
mr batch_2 >>my_temp.txt;
mr batch_3 >> my_temp.txt;
mr batch_4 >> my_temp.txt;
and the out put file is as this
cat my_temp.txt
Machine Name Max Load Current Load Factor O/S Status... (3 Replies)
Discussion started by: ptappeta
3 Replies
8. Shell Programming and Scripting
I have a log file that for some reason, once or two time a month, line foods are missing.
This log is generated from vmstat everyminute. I dont know why sometimes it does this.
Each line in the log should have 18 columns separated by one or more spaces.
Good Log: (not actual log)
1 1... (8 Replies)
Discussion started by: Ikon
8 Replies
9. UNIX for Dummies Questions & Answers
I'm trying to see if there's a way to see column headings when I type the
ls -l command.
I know what some of the fields mean for example in the following listing:
total 136
drwxr-xr-x 2 root root 4096 Jun 5 15:16 bin
drwxr-xr-x 3 root root 4096 Jul 9 15:25 boot
drwxr-xr-x 9... (6 Replies)
Discussion started by: thoughts
6 Replies
10. Shell Programming and Scripting
I have many text file reports generated by a Information Assurance tool that I need to get into a .CSV format or Excel tab delimited format. I want to use sed or awk to grab all the information in the sample text file below and create column headings:Risk ID, Risk Level, Category, Description, How... (5 Replies)
Discussion started by: Bjoeboo
5 Replies