General :: Bash Script Choice Menu From Csv File?

Jan 25, 2011

The script starts first a program I wrote earlier that collects specific data from 3 online csv files and write a summary csv file called /Tribalwars/request.csv . The seperator used is ;

the csv file looks like this but can be any number of rows (but not to many mostly 3 - 5)

Title1;tile2;...;title15;
B1;B2;...;B15
C1;C2;...;C15
D1;D2;...;D15

Now the next part of the script, and that is what I want to change, asks me to manually input some data I have to copy paste from the csv file just created. I mean if i choose to continue to do my calculations for city 2, I need to copy-paste C1 for the first variable 'cityname' , copy-paste c2 for the second variable 'xxx',copy-paste C3 for the third variable 'yyy',copy-paste C15 for the fourth variable 'points'

Then it starts new calculations etc, witch only these variables.

Now could it be possible to make a menu from the csv file with only the according cells on the screen and that I only have to choose a row from the menu?

View 5 Replies


ADVERTISEMENT

Programming :: Bash Scripting: Menu From File?

May 29, 2011

I have a file called list.txt with on word on each line that changes in length. I'd like to make a menu, each line being its own choice. I pieced together most of it the only thing missing is a failsafe for typing a number out of range

Code:
#!/bin/bash
p=`cat list.txt | awk '{print$1}'`

[code]....

View 2 Replies View Related

Ubuntu :: Updating New Kernal Choice Of Menu.lst

Jun 3, 2010

This morning I had 10 updates for my system including a new kernel 2.6.28-19 During install I was asked a question as to which menu.lst to use. I was completely confused as there was no documentation explaining the choices, so I took the default, keep my current menu.list. I did that because I have a modification to my menu.lst having added acpi-noirq I was afraid I would loose that and not be able to boot. Anyhow I ended up with my same menu.lst without the new kernel. So it booted the old kernel 2.6.28-18.Where is some documentation to give one some idea of which of the about 8 choices to make? I can't be the first with this problem. I have another computer to undate that has a different mod to menu list.I would like to know the correct way to choose the proper choice. If I don't get an answer I will try to document in more detail the choices.

I got around the problem by editing menu.list and copying the entries for 2.6.28-18 and changing them to 2.6.28-19 Many folks might not even realise they were running on the old kernel.

View 2 Replies View Related

Ubuntu Installation :: No OS Choice In GRUB Menu After Updating 10.04

May 19, 2010

I installed Lucid Lynx in my p4:2.66 hz machine with XP sp3 pre-installed and the system booted just fine with dual boot option. Then I updated my Lucid. All updates were downloaded. But during update installation a power failure caused PC reboot. Again I started update manager and it gave me option for "Partial Upgrade". I did the same and it instructed me to reboot. The the real damn thing happens now when I rebooted, In the GRUB menu it showed only Memorytest options. I see no OS choice there, I tried to reinstall GRUB from live CD with mount options. And it showed no errors during the procedure. I rebooted but the same problem exists.

View 6 Replies View Related

General :: Open Browse For File Window And Save User Choice In Terminal?

May 30, 2010

is there a Terminal command to open a Target file (same as the one opens when you want to upload a file), let user choose the file and when he clicks open, be able to save his choice?for example:echo "Choose source file"--> command needed to browseand then open or save path to that file

View 1 Replies View Related

Fedora :: Extra Menu For Grub Version Choice During Startup?

Apr 11, 2011

I recently installed Fedora 14 on an old Dell server (Pentium 4). It works fine, except that it somehow includes an extra startup step, in which I have to choose between two different grub versions. Here is the screen I get:

GNU GRUB version 0.97
Fedora (2.6.35.11-83.fc14. i686)
Fedora (2.6.35.6-45.fc14. i686)

Press enter to boot the selected OS, 'e' to edit the commands before booting, 'a' to modify the kernal arguments before booting, or 'c' for a command-line. I always select "Fedora (2.6.35.11-83.fc14. i686)" because I presume it is the latest version. Is there anything I can do to automate the choice of "Fedora (2.6.35.11-83.fc14. i686)" and avoid this extra step? On another subject, I have already modified the custom.conf file to eliminate the login screen step.

View 12 Replies View Related

Ubuntu :: Change The GRUB Bootup Menu's Default Choice?

Mar 3, 2010

Yesterday I installed on my laptop (an IBM Thinkpad T42) "virt manager" using the Synaptic Package Manager. I'm running Karmic.

As part of the installation, SPM had me reboot the computer (which is dual-booted with Windows XP, which I use less than 1% of the time). The new GRUB screen came up showing two new initial lines, the first 2 of the following 4 lines:Ubuntu,

Linux 2.6.31-19-generic-pae
Ubuntu, Linux 2.6.31-19-generic-pae (recovery mode)
Ubuntu, Linux 2.6.31-19-generic
Ubuntu, Linux 2.6.31-19-generic (recovery mode)

When I allow the default choice of the first line to prevail, Ubuntu boots up into a condition in which the Wireless Network Connection fails to open, and in which nothing I've been able to think of makes it open.

If, instead, I scroll down to the third line (which was the initial default choice line, i.e., the default choice line prior to the "virt manager" installation), Ubuntu boots up into a condition in which the Wireless Network Connection operates as usual, viz., immediately.

Scrolling down works, but it would be better, it seems to me, to return to the condition in which the current line 3 either becomes line 1 or else becomes the default bootup choice.

I've used SPM to uninstall "virt manager", but the 2 new intial lines in the GRUB options remain. I understand that with Karmic's version of GRUB, viz., GRUB-2, it is no longer possible to change the bootup menu choices easily.

how I can either eliminate the first 2 lines in my current GRUB screen, or make line 3 the default choice?

View 9 Replies View Related

Ubuntu Installation :: Edit GRUB's Menu To Offer A Choice Between The 2 OSes?

Mar 30, 2010

I installed Ubuntu 9.10 (desktop version) and it performs flawlessly. Now I want to add a second hard drive to the same box, install Ubuntu 9.10 *server* on it, and use GRUB to control which one boots.

Problem is, I'm a Windows pro but a Linux n00b. Should I disconnect the first hard drive (the one with Ubuntu desktop) before I do the server installation on the second (new) drive? Also, how do I edit GRUB's menu to offer a choice between the 2 OSes?

View 1 Replies View Related

Ubuntu Installation :: Grub2 Does Not Display Normal Boot Menu Choice

Dec 8, 2010

machine boots straight to Windows, Grub2 does not display the normal boot menu choices. Therefore, not able to boot into Ubuntu 9.10.Perhaps someone could look at this Results.txt file and shed some light on what went wrong.This machine was working fine for a long time, then all of a sudden, it starting booting straight to Windows.

View 9 Replies View Related

General :: Write A Literal Bash Command In A Bash File?

Nov 29, 2010

I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:

Code:
#!/bin/bash
cat > ~/generateGridmix2data.sh << END

[code]...

View 6 Replies View Related

General :: In Nautilus Show Context Menu On Focused File When Press Menu Key?

Apr 11, 2011

In Windows Explorer, if a file is focused, press Menu Key on keyboard, context menu will show on top of the file. But in Nautilus, the same action shows context menu where the mouse cursor is. That's a bit annoying. Is there anyway to make it work like Windows?

View 1 Replies View Related

General :: Bash Shell Script With Menu?

Apr 12, 2011

I've written a bash shell script (code provided below) that gives the user 4 options. However I'm having a little trouble with the code. Right now when they select option 3, to show the date.It loops over and over again.I have to close the terminal window to stop it because it's an infinite loop. How would I prevent this? Also quit doesn't seem to be working either.

#!/bin/bashe
echo -n "Name please? "
read name
echo "Menu for $name[code]............

View 2 Replies View Related

Fedora Installation :: Can't Chose File System Of Choice

Jun 16, 2010

I can't install with the ext3 or XFS file systems. It will only let me install with ext4. I have used both a live CD and USB.Someone help me find out what I am doing wrong, I would like to have my ext3!

-Fedora 13
-latest kernel
-used Live CD and Live USB (UNetBootin)

View 14 Replies View Related

Ubuntu :: Choice Of File System For Dual Boot With Win7.

Jul 4, 2010

I'm gonna setup a dual boot with Windows 7 on my system. My partition layout will be something like this:

Win7 -> ntfs
Ubuntu (root + home) -> ext4
Swap
Data (media & documents) -> ?

What file system should I choose for the data partition? If I go with ext3/4 it seems I can access them from Win7 using a file system driver, but it seems far from safe, from what google tells me. The driver installers aren't for Win7, and I need Ext4 without extents or an ext3-fs with an inode size of 128 to make it work at all. It saddens me to ask, but should I just go with NTFS?

View 7 Replies View Related

General :: Printing From Bash Shell / Concatenate Files Into One File With File Names Included?

May 11, 2011

I am supposed to take some small files, and print them to a specific printer, such that the small files are concatenated into one file. The file name has to be included in the file that gets printed.

Should I be looking to concatenate the files into one file with the file names included, and then print them?

something like: -printfunction -printername < file*

View 7 Replies View Related

General :: Why Does Running A Program In Bash Work, When Running It In The Menu Doesn't?

Jul 26, 2010

I presume there is something in the JWM window manager - or Puppy Linux Lupu 5.01 itself that is conflicting with the normal loading of GMPLAYER....

I would like to know how to troubleshoot, and fix this problem if possible (even a workaround would be great).

View 1 Replies View Related

General :: Bash - Use Sed To Get Values From File Name?

May 26, 2011

how to retrive every portion separately from following file name? DSA4020_frontcover_20346501_2011-05.doc

I want to retrieve informations as below;

name = DSA4020
type = frontcover
id = 20346501
date = 2011-05

is it possible to do with sed??

View 4 Replies View Related

General :: Get Pid Of Launched Bash File?

Apr 30, 2011

I've created a bash file that calls another bash. And I would like to get the pid from the second file launched, to wait for the file to ends. The second bash file launches processes in background. How can I get the PID from the second bash file?

Here's my code:

Code:

#!/bin/bash
echo "FIRST"
./second.sh
PID=$(echo $!)
wait $PID
echo "CONTINUUING FIRST"

View 3 Replies View Related

General :: How To Update A File In Bash

Jan 26, 2011

how to update a file that is already exist in bash. so far i haven found any. I'm using parameter as my first start for the existent, copy file to a different directory.

View 5 Replies View Related

General :: Installing PHP With Choice Of Extensions?

Jul 19, 2009

I was watching a friend of mine install PHP on SuSE with YaST, and it appeared as though he was able to select the various extensions he wanted compiled into PHP for installation. I didn't know this was possible, I thought you pretty much had to take whatever extensions whoever built the package decided to include. Is it possible with CentOS to install PHP with a custom selection of extensions?

View 4 Replies View Related

General :: Distro Choice For Laptop

Jan 4, 2010

I have an Acer TravelMate 2300 and I was wondering someone could advise me a distribution and configuration that would run smoothly on the system. I have been trying to install the latest version of Mint (no. but it seems to be too much and tends to lag out.

View 3 Replies View Related

General :: Music Downloader Of Choice?

Jan 26, 2011

just wondering what others are using to find and find and download new music. I'm also curious to know of other alternatives to Nicotine+, which I've been using for a little while. I've recently found a nice little widget called Seesu, which is great so far. It lets you search up bands and listen to their songs, and you can download the .mp3 for free afterwards if you like it. Anyway, enough of my pseudo-advertising.

What do you all do to find new music? Are torrent clients like Vuze the way to go, or is software like Nicotine+ better suited for the job? Perhaps you prefer the way of sites like Bandcamp, or by downloading from various online music stores. In any event, it'd be interesting to see how you all go about building onto your playlists.

View 2 Replies View Related

General :: Choice Distribution For Netbooks?

Jun 28, 2011

I have a Dell mini netbook Inspiron 1018, six-cell battery, 1 GB DDR3 RAM (specification).Which Linus distribution is best for you longer battery autonomy for my netbook.

View 14 Replies View Related

OpenSUSE :: KDE 4: File Associations And Menu Itens Missing In Application Menu

Mar 1, 2010

Every applications of KDE 4 menu are missing.

[URL]

When I try to open some file, including directories, "Open with..." window appears.

View 3 Replies View Related

Ubuntu :: Can't Find The K Menu > System Settings > Advanced Tab > Disk And File Systems Menu

Mar 16, 2010

i found a tutorial to auto-mount ntfs drivers at kubuntu start

[URL]

but i can't find the K menu > System Settings > Advanced Tab > Disk & File Systems menu.it disappeared in kubuntu 9.10?

View 2 Replies View Related

General :: Compare File Timestamp In Bash?

May 6, 2010

How do I compare the timestamp of two files? I tried this but it doesn't work:

file1time=`stat -c %Y fil1.txt`
file2time=`stat -c %Y file2.txt`

[code]....

I printed both the time stamps, in order and it gives me

1273143480
1254144394
./script.sh: line 13: [1273143480: command not found

So basically if comparision is not working, I guess. Or if there is any other nice way than what I am doing, please let me know.

Edit: There was no space in between if, so changing it to this works:

if [ $file1time -gt $file2time ]

View 3 Replies View Related

General :: Using File Redirection Operators In Bash?

Sep 3, 2010

What's the difference between using > and >>? How can I use both < and > (redirection operators) in a single command?

View 2 Replies View Related

General :: Pass A File That Changes Name To Another Command In Bash?

Jun 9, 2011

I frequently use wget to download tarballs and zip files from the web, then either untar then or gunzip them. I do:

Is there a way for me to automatically pass the zip file to tar or unzip WHILE wget-ting?

In pseudocode: wget google.com/somfile.zip && unzip

View 3 Replies View Related

General :: Bash: Reading File Into Array?

Dec 2, 2010

I have a file named file.txt with the following contents

Code:

19 man
24 house
44 dyam
90 random

I want to read the file into array and store each line in each index. I've tried using the following code.

Code:

dataarray=($( < file.txt ))

It stores each word in each index rather than each line in each index.

View 3 Replies View Related

General :: Bash Script Search File

Dec 19, 2010

total newb here. call me a script kiddie if you want but here is what i need to do and what i have.

need to:search a hidden log file for a specific string, find what comes after that part, and then output the result to a variable or something that can be used by an application or other script to carry out further actions.

View 3 Replies View Related







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