Programming :: Use Zenity In A Bash Script To Display A .csv File Using '--list'?

Jul 22, 2010

I'm trying to use zenity in a bash script to display a .csv file using '--list' to allow the user to edit some of the values.I can display it fine but i'm unsure how to edit the data? all i can get is whichever line is highlited when hitting ok on the zenity dialog to print.the data in the csv is arranged:

<prod>,<disc>,<qty>,<type>,<location>

View 1 Replies


ADVERTISEMENT

Programming :: Reading Lines To An Array And Generate Dynamic Zenity List?

May 18, 2011

explanation what I want to do exactly:I have a textfile which looks for instance like this:

file.txt:
...
something=else to do

[code]....

View 14 Replies View Related

Fedora :: Zenity - Bash: [/code]: No Such File Or Directory

Apr 9, 2010

Awhile back, PabloTwo pointed me to zenity as a way to create bash scripts with changeable parameters. That thread is here, for anyone interested in reading about it: [URL] Anyway, my problem is that I'm trying to capture input that contains double-dashes ("--") but zenity (or maybe or it's bash???) complains with the following error message:

"This option is not available. for all possible usages.
bash: [/code]: No such file or directory"

Here's an example of what I'm doing:

Code:

# Select the time of day
Flytime=`zenity --list --text="Select the Time" --radiolist --height=300 --width=300 --hide-column=2 --column="Select" --column="Code" --column="Time of Day"
"" "--timeofday=real" "Local Time"

[code]....

What I want to accomplish is for the variable $Flytime to contain either "--timeofday=real" or "--timeofday=dawn" (without the quotes) depending upon which radio button is selected. I have tried escaping "--timeofday" (e.g. "--timeofday" and even "--timeofday") but that's not working.

View 3 Replies View Related

Programming :: Bash Script: Order And Display On External File

Mar 12, 2010

I'd like to create a script which allows me to order its data (let's say: Name, age, department and work start date) by date. And display the result in another file.

View 1 Replies View Related

Programming :: Program A SH - Bash Program With Zenity To Play Radio Based On A Site?

Feb 15, 2011

I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html

My code to get url's radio country.htm is:

Code:

View 2 Replies View Related

Programming :: Zenity - Hiding Hidden Files From File Selections?

Sep 12, 2010

I'm using zenity 2.28.0 in a bash script (under kde4) to select multiple files in a directory. It works fine, but always defaults to showing hidden files. How can I get it to hide hidden files by default?

I know about toggling them on and off with Ctrl-H, but I would prefer not to have to use that. I have my options set so that dolphin and konqueror do not show hidden files by default. I even tried adding shopt -u dotglob to my script. zenity invocation (extracted from a more complex statement): zenity --title "Select Print Files to Delete" --file-selection --multiple

View 5 Replies View Related

Software :: Dynamically Determining The Number Of Check List In Zenity?

Apr 29, 2009

In my project i cannot determine the number of check list initially. I will know dynamically during execution.How to specify the number of check list dynamically in zenity.

View 5 Replies View Related

Debian Multimedia :: Make A Dialog With Zenity Which Would Show An Updating List?

Jan 4, 2011

Is there a way to make a dialog with zenity which would show an updating list? Zenity does it with progress, but I didn't figure out if it's possible to do it with the list. I.e. for example, I want to monitor something, and update the dialog with new list periodically. Is it even possible? zenity can wait for data from stdin, but it just adds stuff to the list. May be there are some control sequences which clear the list in the dialog?

For example:

{ echo "Foo"; sleep 2; echo "Bar"; } | zenity --list --title='Dynamic list?' --text='Some data' --column='values'

How can I instead of adding Bar, replace the Foo with it?

View 2 Replies View Related

Ubuntu :: Simple Script That Will Have Zenity Display A Yes Or No Question?

Apr 15, 2010

Basically I'm trying to write a simple script that will have zenity display a yes or no question and then run a program depending on what I select. I'm also trying to figure out how to have zenity display a message after I select yes or no on the first display. I feel as though I'm forgetting to do something basic with the script...

View 7 Replies View Related

Ubuntu :: Pipe Bash Script To Zenity's Progress Feature?

Feb 22, 2010

Example from zenity:

Code:
#!/bin/sh
(

[code].....

View 1 Replies View Related

Programming :: List 10 Lines By Same In Bash?

Mar 30, 2010

I have a file witch I need to list 10 line by 10 lines with something like press enter to go on in between.
Well, the problem is that i have absolutely no idea on how to implement this.

Can you give me some points?

View 3 Replies View Related

Programming :: List Files In Bash + Add Url Before Them?

Dec 8, 2010

I am an uploader to a various hosts, so this tiny script me a lot. I make a rar archive and split files with 100mb. I could get 3-4 or even 76 parts of rar files and it would take me some time to paste all these urls to remote upload function of filehosting sites. For example:

Code:

server:/home/cober/downloads/teevee# ls -al
total 358784
drwxrwxrwx 2 root root 4096 Dec 8 19:38 .

[code]....

View 1 Replies View Related

Programming :: Awk - Display From The List Of Files Given As Parameters

Mar 12, 2011

I have to display from the list of files given as parameters the name of the file with the largest number of words and their number.(with AWK)

View 2 Replies View Related

Programming :: [bash] Option Followed By Argument List?

Feb 6, 2010

I'd like to pass the following arguments to a bash script in any order:

Code:
myscript -l <country> -r <file1> <file2> ... -o

I read the argument list in a switch shift loop. I figured out how to read the filelist but only if -f is the last option.

how to position the file list anywhere in the argument list?

View 5 Replies View Related

Programming :: Bash: Populate A List Of Arbitrarily Named Files?

Mar 14, 2010

How to build a list of files under a directory that may have any permissible characters in the name, that is anything except NUL? The only possible (?) bash data structure to contain a list of such names is an array because NUL cannot be used as a list item separator so no X-separated list can safely be used; there is no "X" that might not be part of a file name. OK -- but how to populate such an array? Here's what I've tried.

Code:

#!/bin/bash
# Set up test files
dir=$(mktemp -d "/tmp/${0##*/}.XXXXXX")
touch $dir/foo $dir/bar

[code].....

View 10 Replies View Related

Programming :: BASH Read Text List Zip Files Into A Single Archive?

Jul 22, 2010

AKA "zipping on the fly .. the slow-as-molasses way." The list includes full pathnames to each file, and they're all in subfolders of the same parent folder (which, unfortunately, is not the root folder of the drive or system on which the files reside). A cleaned-up and radio-ready portion of the list looks like

Quote:

.../taiga/ahqr-va-choyvp/bv0884-073.jpg
.../taiga/ahqr-va-choyvp/bv2635-073.jpg
.../taiga/ahqr-va-choyvp/bv3067-175.jpg

[code]....

What I'd like to be able to do is zip all the files in the list into a single archive, to avoid the step of having to copy them to the same location (presumably another folder on the HD) and then zip that folder. I'm more inclined to make provisions about extracting to a single folder at some other time. Is this possible in BASH, or would I have to consider a faster, more robust scripting language such as python or perl?

View 8 Replies View Related

Programming :: Bash/Perl Script - Provide List Of Hosts To Choose From And Ssh To Chosen Host?

Apr 6, 2010

I'm not sure if this is best done in Perl or Bash. I'm thinking surely someone else has created something close to what I'm looking for. The results of the script would be that someone would kick off "linux_hosts.sh" r whatever you want to call it, then a top "folder" of options (with hosts contained within each of these top menu choices), then, based on which number corresponds to that top level, they're presented with a set of linux hosts that are relevant to that top level name. Example:

$ linux_hosts.sh
1. VMware hosts 4. Private Domain
2. ESX servers 5. Red Hat boxes

[code]...

View 4 Replies View Related

Programming :: How To Get Zenity Progress Bar Working Properly

Apr 14, 2011

I am busy writing this script to get a pixel count of a large batch of images in a directory for a research project. To do this I'm using a loop to get all the images in the directory. To make the whole procedure more user friendly for some colleagues I decided to use zenity, something I haven't yet really worked with. As not to make sure that the users don't have to watch to this blank screen during the actual processing of the images I'm trying to get the zenity progress bar working. So far the progress bar comes up but instead of changing over time it stays "empty" till all the images are processed and then becomes 100% when all images are done. What servers my needs for now, but since I am trying to learn more about zenity I was wondering how I could change the script to get the progress bar properly working? Below is the piece of script I am talking about.

Code:
cd $input #goto path of image directory
(for a in *jpg *JPG *jpeg *JPEG; do
if [ -f "$a" ]; then #was it a image file
b="$a" #set b to $a
convert -resize 1000x1000! ${b} -depth 1 -format %c histogram:info:$b.txt #get pixelcount and write to .txt file
fi
done) | zenity --progress

View 2 Replies View Related

General :: Bash Script To Fgrep A Large File With List As Source For Searching?

Jan 17, 2011

I need to fgrep a list of things which are in a file. The file in which I will do the SEACHING is a large text file and I need fgrep to output each item from the list as a file with the item from the list as the file name.

Its kinda like this:

./script list.txt largefile.txt

output would be

jack.txt
screen.txt
blah.txt

View 14 Replies View Related

Programming :: Bash Scripting - Display Real Name From Username Logged In + User Processes?

Jan 14, 2011

i am using putty to connect to the linux server and i am using nano as my text editor to write a bash script.

this is my script:

echo "Please enter your Username"
read userName
userName= grep $USER /etc/passwd | cut -d: -f5
echo "Welcome " $userName | cat >> output.txt

the problem i have is that when i enter my username, the output (my real name) does not display in the output.txt. instead it displays in putty. so when i run my script in putty it shows the message to enter username and after i enter my username my real name appears below it. i want it to show in the output.txt

View 1 Replies View Related

General :: Bash - Shell Utils: Convert A List Of Hex To List Of Decimals?

Dec 27, 2010

How can I convert a file with a lot hex numbers into the decimal?

Example: file1
0x59999
0x5acdc
0xffeff

I want to start $ cat file1 | util | cat >file2 and get file2 with smth like

[Code]...

View 3 Replies View Related

Programming :: Bash File Comparing - Report How Many Matching Words My Main File ?

Jun 9, 2009

I have been messing with diff and grep for 2 days now without result

I am trying to match a file consisting of words to many separate other wordfiles in a specific directory. one by one.

What i want the script to do is to report how many matching words my main file has with every file in the directory, each in turn

setup:

Each of em are plain text files with 1 word per line

Output should be something like:

SCRIPT REPORT:

View 8 Replies View Related

Programming :: BASH Sort List By End Of Line To X Position In Each Line?

Aug 18, 2010

I'm trying to make another file annotation script a little speedier than it has been by the up-until-now proven method of checking the last four characters in a filename before the "dot" (eg .jpg, .psd) against a list of known IPTC categories and Exiv2 command files. It occurred to me that if one script generated a list of files in directory foo, and the same or another script sorted that list by that four-letter tag,then that list could be used(instead of a for/do/done loop on the real files in the folder) by the command-file-matching script to "vomit out" which annotator file would go with file nastynewfile.jpg, f'r'instance. The script I had been using for this task looks like this:

Code:

while read 'line';
do
sp=$(echo $line)
vc=$(echo $sp | cut -d"," -f1)
cv=$(echo $sp | cut -d"," -f2)

[code]....

Where I seem to be stuck is with how to sort the lines in templist, which may be any number of different lengths, from back to front. sort -k looked promising, except it seems only to work the other way round. I thought of invoking a

Code:

q=$(expr length $line); echo $q
n=$[q-8]; echo $n

kind of thing, but that presented the problems of how to sort by those, how to tell sort where to find them (grep?) and how to "stitch them back in" to the original list, which is what I want to sort in the first place.

View 14 Replies View Related

Programming :: Create Cvs From List Text File

Dec 21, 2010

I have a file with 5000 lines. it is a list of books authors, series and titles. all lines start with the author names, than there is a dash (-) than the series name, a dash again and the title of the book.

The problem I encounter is that sometime there is a series, sometime not, and as I try to enter this list in a database, I wanted to create a cvs file to import into mysql.

ex:

The best would be to be able to add in the second line, a "space dash space" just after the author name, but how to make sure it does not do it to the first line as well.

If I could separate all line with 2 dash, (grep ?) then I would be able to do a simple replace, and change the single dash into two.

View 2 Replies View Related

Programming :: Take A List From A File And Use It In A For Loop In Python?

May 11, 2009

so far I have this

list = open('list.txt')
for x in list:
list.read(x)

View 3 Replies View Related

Programming :: Bash File Which Requests File Name

Nov 30, 2010

What's the easiest way for me to make a program that requests a file location and then tar balls it. I basically want to start making a simple method of using pv with tar (lzma).

View 8 Replies View Related

Programming :: Get A List Of File Install Locations With Make It?

Dec 21, 2010

I have a bit of a problem and the only solution I can think of at the moment is a very tedious one, so I was hoping there would be a better way. What I am trying to do is cross compile the PPPD program so that I can install it on an embedded system (this system does not have make/gcc on it). It was easy to cross compile it, but I can not run "make install" since I'm compiling on a secondary machine. I don't want to install PPPD on this secondary machine (I couldn't anyway, because it was compiled for a different architecture) and I can't run make install on the target machine because there is no make/build system for it.

So it seems like what I would have to do is to manually copy over each compiled file from the build machine to the appropriate location of the target machine. And the only way (that I know of) to figure out how to do this is to manually examine the Makefiles (yes, there are several for PPPD) and figure out which file should go where on the target system. This isn't trivial because it uses a hierarchy of makefiles and the probability of human error for this method is high.

Is it possible that I could run another command that would give me a list of all the commands that make install would perform? Or a list of all files and their target location for "make install"? Or possibly some other solution that I am completely unaware of that would make this task not so painful and error prone?

View 8 Replies View Related

Programming :: PHP - List Directory - Choose A File - Change Its Name

Mar 16, 2011

Im looking to use PHP to list a directory. When I click on a filename, I'd like it to automatically remove the first 16 characters off of the filename and save it to the filesystem.

View 6 Replies View Related

Programming :: Store Line From Text File Into List C++

Feb 6, 2011

I'm wondering how it is possible to read each line from a text file, and then store each line separately in a list, using C++?

View 2 Replies View Related

Programming :: HUGE Files - Compare A List Of Patterns From One File And Grep Them Against Another File And Print Out Only The Unique Patterns?

Aug 13, 2010

I am trying to compare a list of patterns from one file and grep them against another file and print out only the unique patterns. Unfortunately these files are so large that they have yet to run to completion. Here's the command that I used:

Code: grep -L -f file_one.txt file_two.txt > output.output Here's some example data:

Code:
>FQ4HLCS01BMR4N
>FQ4HLCS01BZNV6
>FQ4HLCS01B40PB
>FQ4HLCS01BT43K
>FQ4HLCS01CB736
>FQ4HLCS01BU3UM
>FQ4HLCS01BBIFQ

how to increase efficiency or use another command?

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved