hi all
i have input file like this abc.txt
filename.out:
<TAB>ABC<TAB>9
<TAB>AKC<TAB>1
filename1.out:
<TAB>XYZ<TAB>1
<TAB>XYN<TAB>4
and i am trying to replace \n\t with \t so that output will be like this:
filename.out:<TAB>ABC<TAB>9<TAB>AKC<TAB>1... (5 Replies)
Hi,
what I am trying to do in PHP, is to replace the Title. I need some of the URL information inside aswell depending on the domain.
The title is always different so I need to store it in a variable, put the url info like described below in front of it.
Here is an example how it should... (0 Replies)
I generally save a lot of web pages for reading offline which works out great for school. Now I have to spend a lot of time on the bus and I am looking for the best way to read some of these webpages using my Nokia 7610.
I have uploaded the files to my phone, but they are deadly deadly slow to... (2 Replies)
I have special requirement, my system provided the xml file as below(available xml file) and I need to convert it as below desired xml file.
is it possible thru shell scripts or awk?
What I need is :
my available xml contains number of records with tags <RevenueAmounts>, the last of record is... (6 Replies)
The Problem
I have n files all named "conf.cfg", each of which contain a line that reads: "MyVar=XXX", where XXX can be any value.
I have a second file called report.xml, that might read:
<Reports>
<Report>Report1</Report>
<Report>Report2</Report>
<Report>Report3</Report>
</Reports>
I... (1 Reply)
Hi please help me with this .
I have a file test.txt with following content
$cat test.txt
<td>$test</td>
<h2>$test2</h2>
and I have a ksh with following content
$cat test.ksh
#!/bin/ksh
test=3
test2=4
while read line
do
echo $line
done < test.html
I am expecting the output as (4 Replies)
Hallo,
im basically a complete noob on shell scripting and im trying to replace or rather add 1 to a number between xml tags.
The xml basically has a tag somewhere that looks like this:
<tag>12345678901234</tag>
Now i want to replace the number between the tags. And i want the file to... (6 Replies)
Hello!
I'd like to modify custom values in a XML config file between comment tags using bash script.
<feature>
<keyboardshortcut>C-m</keyboardshortcut>
<option1>disabled</option2>
<option2>enabled</option2>
</feature>
<!-- bash script features START -->
<feature>
... (2 Replies)
Hi,
I have a file i which i want to replace {gIntegraHost} to {gTestRunHost} between <TCPSampler and curl only.
I am firing below command
sed '1,/<TCPSampler/!{ /curl/,/<TCPSampler/!s/{gIntegraHost}/{gTestRunHost}/; }' file1
But only on instance is getting replaced not all.
Any idea how... (6 Replies)
Ok, so this is stupid simple, and I know I am going to feel like an idiot when I get help.
I am altering a HTML report that has contraband in it so that the links to said contraband and the images are not shown.
The link/img pairs are in the form of :
<a... (5 Replies)
Discussion started by: twjolson
5 Replies
LEARN ABOUT NETBSD
flock
FLOCK(1) BSD General Commands Manual FLOCK(1)NAME
flock -- Provide locking API for shell scripts
SYNOPSIS
flock [-dnosvx] [-w timeout] lockfile|lockdir [-c command] | [command ...]
flock [-dnsuvx] [-w timeout] lockfd
DESCRIPTION
The flock utility provides flock(2) access to the command line or scripts. The first form locks a file or directory while the command pro-
vided is executed. If the file or directory does not exist, then a file is created.
The second form can use an arbitrary file descriptor that is provided from a shell script for example:
(
flock -s 100
# commands to be executed under the lock
) 100> /path/to/lockfile
The following options are available:
-c command Pass a command to a the shell.
-d, --debug Provide debugging output.
-n, --nb, --nonblock
Don't block and fail immediately if the lock could not be obtained.
-o, --close Close the file before executing the command. This is useful if the child forks and should not be holding the lock.
-s, --shared Obtain a shared lock.
-u, --unlock Unlock an existing lock. This is available only for a file descriptor.
-v, --verbose On error print an explanation of the failure.
-w, --wait, --timeout seconds
Fail if the lock could not be obtained after seconds.
-x, --exclusive Obtain an exclusive lock.
EXIT STATUS
The flock utility exits 0 on success, and >0 if an error occurs.
SEE ALSO shlock(1), flock(2)HISTORY
An flock utility appeared in NetBSD 6.1.
BSD November 2, 2012 BSD