Programming :: Print A Message When A Diff Shows Files Match?
Jul 16, 2009
I'm writing a script using ksh that diffs two dirs that contain about 30 files, and writing the results on a logfile. When files differ, it writes the difference with no problem, but I also need the script to write a message if no differences are found.
View 3 Replies
ADVERTISEMENT
Jun 5, 2011
I cannot print pdf files. I have tried using okular and xpdf. The documents display in the program, but print preview shows a blank page. The printer then sends out blank pages. I have tried printing on 2 different printers using usb cables. Using terminal to process the commands shows error:
Quote:
xxx@xxx:~$ xpdf
***** MediaBox = ll:0,0 ur:611.976,791.968
***** CropBox = ll:0,0 ur:611.976,791.968
***** Rotate = 0
Segmentation fault
Converting to .ps also is blank.
View 6 Replies
View Related
Jul 21, 2010
I need some direction on a small scripting question. I've been doing some development and storing the code on a network drive with multiple user access. My development is getting complex enough that it is time to set up a svn repo for it. I would like to set up a little script (if possible) that prints a message/reminder to whomever is accessing the code directory stating that the code is ultimately stored in svn and any changes need to be checked in, etc. Is there a way to have linux print a message to the screen based on a 'cd /specific_dir/' command? So far google is mum on the topic. Using Debian and bash shell.
View 5 Replies
View Related
Mar 18, 2010
why the message string isn�t output to the Applet window in the code below?
Code:
import javax.swing.*;
class printit extends JApplet {
[code].....
View 4 Replies
View Related
Mar 15, 2010
I have a problem when using awk:
e.g: awk '{processing text}' File1 > File2
But when I'm processing the File1, I want to print out some messages to the screen (not the File2). How can I do that?
View 5 Replies
View Related
Dec 6, 2008
I initially had a problem accessing the CUPS interface (see my other post) and got that resolved by adding the user "cupsys". Now, everything "looks" ok, and when I print a test page, it shows it as completed (in CUPS). However, the page never prints.
The printer is a Canon MP600 (using the canonmp600en.ppd file to configure it). Here's the output of my conf file.
Code:
# Show troubleshooting information in error_log.
LogLevel debug
[code]...
View 8 Replies
View Related
Nov 5, 2010
I would like to compare two md5sum outputs to see if the files match. in my script I have
Code:
ORG_FILE="/path/to/org/file.zip"
NEW_FILE="path/to/new/file.zip"
MD5_ORIG=$(md5sum -b "$ORG_FILE")
[code]....
How do I get just the MD5 hash and not the */.... stuff so I can compare them. i tried Code: JUST_HASH=${$MD5_ORIG:0:32} but All I get is
dir_mon_notify.sh: line 79: ${$MD5_ORIG:0:32}: bad substitution
View 1 Replies
View Related
Oct 21, 2010
I have the following query:
Code:
$sql="SELECT table1.datetime, table1.user_id, table2.ip, FROM table1,table2 WHERE id='$id' AND (table1.id = table2.id AND table1.datetime = table2.datetime)";
In table2 the datetime fields are about 1 to 2 seconds off due to the source of the data, which I cannot change.
Is it possible via a query match table1.datetime & table2.datetime by HH:MM (ie. to the minute instead of to the second)?
View 1 Replies
View Related
Jul 15, 2011
Our one remaining problem seems to be printing. She has an HP OfficeJet 6500 USB printer. We have the computer conntected. Strangely, when I boot from the CD the printer shows up as installed even though I did nothing to install it. After having submitted a print job it shows the printer status as "idle" and the print queue is empty. I tried deleting that printer and re-installing. The installation went as one would expect. However the results are the same. I'm beginning to think that somehow the problem is related to the fact that we are operating from the live CD. getting this thing to print from the live CD.
View 9 Replies
View Related
Jun 2, 2010
I like the output of
Code:
git diff --color-words old..new
but I do not know how to set --color-words permanently in the ~/.gitconfig file.
Edit: I guess I should've said that I do not want an alias for diff --color-words
View 5 Replies
View Related
Jun 19, 2010
Does diff not like arrays? How do achieve the following?
Code:
stuart@stuart:~/music transfer$ diff file1.txt file2.txt
1c1
< bonkers_in_phoenix.mp3
[code]....
View 14 Replies
View Related
Feb 16, 2010
I would like to make a one-liner, which diff's "ps aux" output before and after killing a process. So basically it should be a combination of fallowing commands:
1) diff -u
2) ps aux | awk '{print $2}'
3) kill `ps aux | grep [c]ron | awk '{print $2}'`
4) ps aux | awk '{print $2}'
How to achieve this? Something like this:
Code:
diff $( kill `ps aux | grep [c]ron | awk '{print $2}'` && ps aux | awk '{print $2}' ) $( ps aux | awk '{print $2}' )
I don't have pgrep or pkill available.
View 3 Replies
View Related
Dec 26, 2010
I'm new to scripting and I have a trouble with if statement syntax. The code is: Code: #there is a diff command here, and it does what i want but#i wanna see 1 if the exit value of diff is 0, and otherwise i wanna see 0.#the problem is here: (syntax error near unexpected token "then")
if["$?"==0];
then
echo 1
[code].....
View 1 Replies
View Related
Mar 26, 2010
i tried using diff --GTYPE-group-format= with <%, but not sure that right solution.Here's what im trying to do. I have two c source files, file1 and file2. file1 has a function in it that's been modified in file2. However, the functions begin at differnt line numbers in eachof the files. Is there a way to specify a range of file numbers on file1 and file2 to compare, using diff or any other combination of utilities? I can always output text from a range of lines from each file to two separate and new files and then compare those, but that's tedious. I could also write up a script to automate this type of solution, but I imagine there's an existing way of doing this.
View 1 Replies
View Related
Aug 15, 2010
I have installed CentOS 5.5 to prepare for my RHEL certification. I have a Epson T11 printer. It shows Epson T11 ready when I try to print something. But it never prints. I tried lpq also. But no success. The following is the error I get:
View 4 Replies
View Related
Aug 10, 2010
The printer prints with ubuntu live cd. I deleted the printer from the list and I followed the instructions here. When I tried to print, sometimes it shows that the documents was printed (but my printer is standby) sometimes it shows the document failed.
View 1 Replies
View Related
Nov 13, 2010
Any time I watch a screencast dealing with notifications, there are always multiple of them on the screen. But when I have a program that uses them it always just allows one at a time.
View 10 Replies
View Related
Nov 11, 2010
After it tries to print and nothing happens this shows up stopped. Idle- /usr/lib/cups/filter/footmatic-rip failed.
View 2 Replies
View Related
Nov 8, 2010
I upgrade my f13 to f14 with preupgrade but after that i give this boot message.how can i fix this error?
Code...
how can i fix this error?
View 1 Replies
View Related
May 4, 2011
i changed my password and whenever i log in i get a message that ur login keyring password and user password do not match, so how do i change my login keyring password!!
View 1 Replies
View Related
Aug 15, 2010
When running certain programs (i.e. Nedit or Gourmet Recipe Manager) asking to print will give the following message: Enter print command:
Am using 13.1 32 bit with cups. Everything works properly and prints properly I just don't know what to enter for a 'print command'.
Have tried entering lpr and cups.
View 3 Replies
View Related
Feb 13, 2010
I have windows 7 and ubuntu karmic dual boot system.i can easily transfer files via bluetooth in windows 7 but in ubuntu it shows a message bluetooth adapter not connected while as i dont use any such adapter while working in windows .
View 4 Replies
View Related
Oct 11, 2009
I have a redhat 4 on a Hp Proliant server. I did a restart of the server. Now it is not getting to the grub menu. It shows:
Attempting boot from hard drive (C
GRUB GRUB
and it hang there.
I know it has something to do with some controller stuff and I could not figure it out. It used to be working till I reboot.
View 5 Replies
View Related
Apr 8, 2011
How awk and sed can be used to preg match strings? how would I go about matching a string like:
Code:
View 7 Replies
View Related
Sep 16, 2009
I need to edit the sudo file on lots of machines. I figure the easiest way is to run a for loop to ssh to each box, sed the sudoers file to a new file & copy/move back over the top of the original (and of course, change permissions accordingly)
The problem is, I'm not sure how to add a line after a match with sed.
So if my file looks like:
Code:
I'd like it to add the new sudoer after "other" so the file looks like:
Code:
View 2 Replies
View Related
Aug 27, 2010
I'm using fedora 13 x86_64 and firefox. I have installed flash player: flash-plugin-10.1.82.76-release.i386.rpm.
Whenever I open any website having flash content, firefox shows missing plugin symbol and message.
View 3 Replies
View Related
Dec 22, 2010
i am using red hat linux 5.0 when i start my computer it shows me the message ofINIT:No inittab file foundEnter run level:i dont what to enter here if anybody know then
View 7 Replies
View Related
Jun 2, 2011
how I can match a literal string in awk i.e. making awk to *not* interpret the characters coressponding to its builtin operators in a given string. Take this code:
[Code]...
View 5 Replies
View Related
Feb 25, 2011
i have an sql table with 2 columns i run a script that randomly selects a word from the table in column 1.
the word is displayed on the screen and I guess what it means i concatenate the randomly selected word and the answer the script looks for a match in mysql if it finds a match it says "Good job!" if there is no match it will say "not correct". However when i get it right it says not correct even though when i echo the variables they look exactly the same. the script below:
#!/bin/bash
var=$(mysql translator -u root --password=*-N<<EOF
SELECT word FROM tagalog ORDER BY RAND() LIMIT 1
EOF
)
[Code]....
View 4 Replies
View Related
May 15, 2011
My problem is like this I have to delete all lines between two pattern match example- suppose below is the content of the file then i have to delete all lines between text1 and text2
...
text1
abc
def
ghi
[Code]....
View 14 Replies
View Related