05-22-2013
Thanks
That's really helpful.
Now I can play around with it and get a good understanding...
Cheers
Brad
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello. I am trying to convert occurrences of 'NULL' from a datafile. The 'NULL' occurences appears at this:
|NULL| NULL|NULL| NULL|NULL| NULL|NULL| NULL|
There should be 52 fields per line.
I would like any occurrence of | NULL| or |NULL| to appear as '||'
Currently I am using this sed... (2 Replies)
Discussion started by: bestbuyernc
2 Replies
2. UNIX for Dummies Questions & Answers
Hi Gurus,
I have a small requirement.
Let suppose i have a file test.txt
test.txt contains
Dispatched date = '2008-04-08'
Name = 'Logers'
Now i want to add one more line to it as Number of Responses = "$a"
$a will be chnaging dynamically which i had grepped it in the script.
Now i... (6 Replies)
Discussion started by: pssandeep
6 Replies
3. Shell Programming and Scripting
Hi All,
I am facing a small problem in sed. I want to insert a line in the existing file.
Existing code:
access to attr=userPassword
by self write
by * auth
access to *
by self write
by users read
by anonymous auth
Desired code:
access to attr=userPassword
by self... (14 Replies)
Discussion started by: nua7
14 Replies
4. Shell Programming and Scripting
Hi All,
I need to pick up data on both sides of "=" sign.
For eg, following is the context that I have.
125.156.125.147=machine1
147.125.185.156=machine2
147.125.185.159=machine3
Can I have the ip address in one variable and machine name in another variable using sed or awk.
... (1 Reply)
Discussion started by: nua7
1 Replies
5. Shell Programming and Scripting
Hi
I have a file, with format like:
column1|coulumn2|column3|column4
A|X|K|18
L|O|R|31,42,25
G|H|I|55,66
L|E|Q|25,31,94
output required:
column1|coulumn2|column3|column4
A|X|K|18
L|O|R|31,25
L|E|Q|25,31
Input File Format: All columns are seperated using |, last column... (8 Replies)
Discussion started by: New to awk
8 Replies
6. Shell Programming and Scripting
Hello everyone,
unfortunately I am no unix nor scripting guru, which is why I am asking for help here. I am trying to reformat a .csv file using sed or awk which has the following format:
a,b,C-D-E,f,g
h,i,J,k,l
m,n,O-P-Q-R-S,t,u
v,w,X-Y,z,a
It's basically a 5-field text file which has an... (7 Replies)
Discussion started by: awayand
7 Replies
7. Shell Programming and Scripting
This post is in reference to https://www.unix.com/shell-programming-scripting/137977-tricky-sed-awk-question-post302428154.html#post302428154
I am trying to go the opposite direction now:
I have the following file:
a,b,C,f,g
a,b,D,f,g
a,b,E,f,g
h,i,J,k,l
m,n,O,t,u
m,n,P,t,u
m,n,Q,t,u... (3 Replies)
Discussion started by: awayand
3 Replies
8. Shell Programming and Scripting
Hi,
I have a file which contains two strings: AAAAA and BBBBB
I have two variables in my script:
DATE="03/21/2010"
aDate="20100321"
I need to replace string AAAAA with variable $DATE and BBBBB with $aDate. Here is what I do
sed "s/AAAAA/$DATE/" $BASIC_TMPLT | sed "s/BBBBB/$aDate/" >... (4 Replies)
Discussion started by: axed
4 Replies
9. Shell Programming and Scripting
Hi All,
I have one file with below type of data in it,
$ cat test.txt
###123
###xyxytuerwb
###2
###tyupe
Here I would like to replace all the characters with "x" after the 3 "###" with the same number of characters.
Can you please help me to achieve this. (7 Replies)
Discussion started by: gr8_usk
7 Replies
10. UNIX for Dummies Questions & Answers
Hi
Can some one tell what does this sed command do
sed 's/*$//g
I am more curious on the highlighted part , can some one explain what does that mean.
Thanks
Sri (1 Reply)
Discussion started by: Sri3001
1 Replies
LEARN ABOUT REDHAT
dvcont
DVCONT(1) General Commands Manual DVCONT(1)
NAME
dvcont - send control commands to DV cameras
SYNOPSIS
dvcont <command1> [ <command2> ... ]
DESCRIPTION
dvcont is a command line tool to send control commands via an IEEE1394 link to a device that implements the AV/C specifications by the 1394
Trade Association. Or for the non-techies: dvcont lets you remote control your DV camera via a Firewire cable. The following commands are
understood:
dev <number>
Select device number on chain to use. (dvcont tries to automatically detect the camera. Use the dev command BEFORE any other com-
mands for manual control.)
play Tell the camera to play. If already playing, it toggles slow-motion.
reverse
Tell the camera to play in reverse. If already playing, it toggles slow-motion.
trickplay < -14 to +14 >
Tell the camera to play at various speeds. 0 = forward play, -14 = fastest reverse, -8 = 1X reverse, -1 = slowest reverse, 1 =
slowest forward, 8 = 1X forward, 14 = fastest forward. (Not supported by all cameras.)
stop Tell the camera to stop playing.
rewind Tell the camera to rewind. (Use in stop or play mode.)
ff Tell the camera to fast forward. (Use in stop or play mode.)
pause Tell the camera to toggle pause play.
next Tell the camera to go to the next frame. (Use in pause mode.)
nextindex
Tell the camera to search for the next scene. (Use in pause or play mode.)
prev Tell the camera to go to the previous frame. (Use in pause mode)
previndex
Tell the camera to search for the previous scene. (Use in pause or play mode)
record Tell the camera to record. (Use with caution!)
eject Tell the camera to eject the tape. (Not supported by all cameras.)
timecode
Report the timecode on tape in the format HH:MM:SS:FF.
status Report the status of the device.
verbose
Tell the program to tell you debug info.
version
Tell the program to tell you the program version.
help Tell the program to show you a help screen.
AUTHORS
dvcont was written by Jason Howard <jason@spectsoft.com> and Dan Dennedy <dan@dennedy.org>. This man page was written with the help of
help2man by Daniel Kobras <kobras@debian.org> for the Debian GNU/Linux distribution (but may be used by others). Updated by Dan Dennedy
<dan@dennedy.org>.
dvcont September 2001 DVCONT(1)