01-02-2015
No user interaction. The gphoto cmd to return iso is calling by node.js for automatic scripting. The filtered result by a nested sed or greb command should return always the integer of the current iso setting.
User will changes the iso on the camera and the automated script monitoring periodically the current iso.
There is a weakness of the call gphoto2 --get-config /main/imgsettings/iso it returns the current value but all the time the enum.
My script calls internally and autom.
gphoto2 --get-config /main/imgsettings/iso | sed <nested commands>
to return the index of current iso setting only for further processin.
Last edited by Nic2015; 01-02-2015 at 01:16 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a configuration file that when a certain script runs in updates. I want to use sed and can't seem to get the syntax right.
A line from the configuration file looks like:
DATE=20040909 12:00:10
When the script is run I want to change the date and time, i.e. removing the previous... (7 Replies)
Discussion started by: dbrundrett
7 Replies
2. Shell Programming and Scripting
hello!
I have a few sed commands
sed '/^$/d' < $1 > tmp.t
sed '/^ \{3,\}/d' < tmp.t > tmp1.txt
.....
how can I write them in a single line?
sed '/^$/d' < $1 > | '/^ \{3,\}/d' < $1 > tmp1.txt
any idea?
thanks. (5 Replies)
Discussion started by: george_
5 Replies
3. UNIX for Dummies Questions & Answers
I would like to change the lines:
originalline1
originalline2
to:
originalline1new
originalline1newline
originalline2new
originalline2newline
To do this, id like to combine the commands:
sed 's/^/&new/g' file > newfile1
and
sed '/^/ a\\
newline\\
\\ (2 Replies)
Discussion started by: Dave724001
2 Replies
4. Shell Programming and Scripting
Hello
I need to run some sed commands but it involves "/" in the substitute or delete, any ideas how I get round the problem.
Example:
cat file1.txt | sed -e '/</Header>/d' > file2.txt
This errors due to the forward slash before the Header text.
Thanks (3 Replies)
Discussion started by: Dolph
3 Replies
5. Shell Programming and Scripting
Hi,
I've a shell that uses two sed commands to tailor a file.
sed 's/ */ /g' | sed 's/%/%%/g'
Is it possible to merge this in to a single sed?
Thanks! (2 Replies)
Discussion started by: dvah
2 Replies
6. UNIX for Dummies Questions & Answers
Here's the input:
alpha, numeric or alphanumeric string ("line 1 string")
numeric string ("line 2 string")
numeric string ("line 3 string")
numeric string ("line 4 string")
...
where
- each numeric string is in a pattern that can be matched with RE but
- there can be any number of... (2 Replies)
Discussion started by: uiop44
2 Replies
7. Shell Programming and Scripting
Hello,
I am very new to Unix and using sed so I'm struggling a little bit with this command and was hoping someone could help me out.
I want to find a nested pattern in a file and replace some text in that file with text from another file.
For example, in file one I have something like... (11 Replies)
Discussion started by: planetary12
11 Replies
8. Shell Programming and Scripting
Hello, would you please help me with why my SED command file is outputting the entire input file instead of only the text that I'm trying to block?
cat testfile
O 111111111-00
DUE-DATE
METHOD:
FREQUENCY:
O 222222222-00
DUE-DATE
METHOD:
FREQUENCY:
O 333333333-02
DUE-DATE
METHOD:... (4 Replies)
Discussion started by: lneedh1
4 Replies
9. Shell Programming and Scripting
Ok, this one isn't for everybody, it's pretty tough and I've spent a good deal of time on it without figuring it out yet.
Can anybody get this script to work:
#!/bin/bash
cq_fname="%let outputfile="/user/cq_"$1".csv";"
sed "29s/.*/\"$cq_fname\"/" file1.sas >... (3 Replies)
Discussion started by: nocloud
3 Replies
10. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
I have to write a script using sed, which delete everything between curly brackets and the brackets themself. The brackets might be nested.
The input-file is:
aaa { bbb ccc { ddd eee } fff { ... (2 Replies)
Discussion started by: FuzzyGnome
2 Replies
LEARN ABOUT SUSE
libgphoto2
LIBGPHOTO2(3) The gPhoto2 Reference (the man LIBGPHOTO2(3)
NAME
libgphoto2 - cross-platform digital camera library
SYNOPSIS
#include <gphoto2/gphoto2.h>
DESCRIPTION
The gphoto2 library provides applications with access to a variety of cameras.
This man page will be extended with autogenerated documentation of the interface types and methods used for communication between the
gphoto2 library and a frontend.
FILES
~/.gphoto/settings
Here gphoto2 applications may store their configuration used to access gphoto2.
To track down errors, you can add the --debug parameter to the gphoto2 command line and, if dealing with USB problems, setting the
environment variable USB_DEBUG=1.
ENVIRONMENT VARIABLES
CAMLIBS
If set, defines the directory where the libgphoto2 library looks for its camera drivers (camlibs). You only need to set this on OS/2
systems and broken/test installations.
IOLIBS If set, defines the directory where the libgphoto2_port library looks for its I/O drivers (iolibs). You only need to set this on
OS/2 systems and broken/test installations.
LD_DEBUG
Set this to all to receive lots of debug information regarding library loading on ld based systems.
USB_DEBUG
If set, defines the numeric debug level with which the libusb library will print messages. In order to get some debug output, set it
to 1.
SEE ALSO
gphoto2(1), libgphoto2_port(3), The gPhoto2 Manual, automatically generated API docs, [1]gphoto website
AUTHOR
The gPhoto2 Team.
Hans Ulrich Niedermann <gp@n-dimensional.de>. (man page)
REFERENCES
1. gphoto website
http://www.gphoto.org/
08/16/2006 LIBGPHOTO2(3)