hello
whats the difference between excuting a shell script as
a)sh myscript.sh
b). ./myscript.sh
i noticed that my shell script works fine when i run it as . ./myscript
.sh but fails when i run it as sh myscript.sh could anybody explain why.
the shell script is very simple
... (9 Replies)
Hi,
Could you please explain me the below statement -- phrase wise.
sed -e :a -e '$q;N;'$cnt',$D;ba' abc.txt > xyz.txt
if suppose $cnt contains value: 10
it copies last 9 lines of abc.txt to xyz.txt
why it is copying last 9 rather than 10.
and also what is ba and $D over there in... (4 Replies)
$ echo a.bc | sed -e "s/\|/\\|/g"
|a|.|b|c|
$
Is the behavior of the sed statement expected ? Or is this a bug in sed ?
OS details
Linux 2.6.9-55.0.0.0.2.ELsmp #1 SMP Wed May 2 14:59:56 PDT 2007 i686 i686 i386 GNU/Linux (8 Replies)
I've written a small script to replace certain words in all the the files in a directory.
#!/bin/sh
#Get list of files to be edited
file_list=`ls -p`
for i in $file_list
do
echo "Processing $i"
alteredi=`echo "$i" | sed -e 's/\//d/'`
if
then
if
then
#actual altering (2 Replies)
Hi,
The following command works fine for me, but I could not grasp the logic working behind of sed command, it's obscure to me :( :confused:
echo "./20080916/core/audioex.amr" | sed "s%\(\)/%\1_%g"
o/p: ./20080916_core_audioex.amr
Could anyone please explain to me in detail, that how... (6 Replies)
Hi all,
I want to do a very simple thing with sed. I want to print out the line number of a disk I have defined in /etc/exports, so I do:
It's all good, but here's the problem. When I define md0 in a variable, I get nothing from sed:
Why is that? can anybody please help?
Thanks (2 Replies)
I suppose that this is not actually a script question, but I noticed this while working on a bash script homework assignment and I have been impressed with the quality of posts here -- so that is why I posted it here.
I have this text file named textfile:
total 40
-rwxr-xr-x 1 joeblow... (2 Replies)
I have a log with entries like:
out/target/product/imx53_smd/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/bindings/V8HTMLVideoElement.cpp
: target thumb C++: libwebcore <=... (8 Replies)
Discussion started by: glev2005
8 Replies
LEARN ABOUT CENTOS
cups-browsed
cups-browsed(8)cups-browsed(8)NAME
cups-browsed - A daemon for browsing the Bonjour broadcasts of shared, remote CUPS printers
SYNOPSIS
cups-browsed [-v | -d | --debug]
DESCRIPTION
cups-browsed has three independently switchable functions:
1. Browse Bonjour broadcasts of remote printers and create/remove local raw queues pointing to these printers.
2. Browse CUPS broadcasts of remote printers and create/remove local raw queues pointing to these printers.
3. Broadcast local queues with the CUPS protocol.
OPTIONS -v, -d, --debug
Debug mode
FILES
/etc/cups/cups-browsed.conf
NOTES
Please take references to cups 1.6.x to include newer versions. Similarily, cups 1.5.x is intended to encompass older versions too.
In environments with only cups 1.6.x servers and clients (plus cups-browsed on either server or client or both) the function described in
1. enables the automatic discovery of remote queues and their display in printing dialogues of applications and with command line tools.
The facility provided by 3. means that servers running cups 1.6.x plus cups-browsed can broadcast their local queues so that clients with
cups 1.5.x get these queues automatically available. The outcome of 2. is that clients running cups 1.6.x plus cups-browsed can use the
CUPS broadcasts from servers with cups 1.5.x. As with browsing of Bonjour broadcasts, the created local raw queues are available to appli-
cations and command line tools.
SEE ALSO cups-browsed.conf(5)
/usr/share/doc/cups-filters/README
AUTHOR
The authors of cups-browsed are listed in /usr/share/doc/cups-filters/AUTHORS.
This manual page was written for the Debian Project, but it may be used by others.
29 June 2013 cups-browsed(8)