General :: Bash Versus Pinyin ?
Aug 23, 2010
I am trying my hand at Bash scripting. I have a file with lots of pinyin, which is the romanized version of Chinese characters and words. A typical entry looks like this,
"7 shuo1 to speak"
Seven is the number of the entry shuo is the pinyin, 1 is the tone mark and is the Chinese character.
What I would like to do is change the format so that it looks more like this:
7 shuo 1
Each field needs to be re-assigned to a variable in an array and then printed to the screen and saved to a file in the same order it was input. This is to prepare the data for another project I am working on in imagemagick.
I have spent all day looking at linux man pages and have very little to show for my efforts. What is the best way to approach this? grep, awk, sed...?
View 1 Replies
ADVERTISEMENT
Oct 19, 2010
I run Fedora. I use the Ibus input method. After recent updates, the character ,zhe = English -ing ending comes out wrong.(See, even here it is wrong, if you have Chinese enabled)
View 14 Replies
View Related
Feb 15, 2010
I'm trying to get Chinese filenames to be listed in alphabetical order according to pinyin. Long ago I remember having to install a particular package for that to happen, but in the past year or so I believe that ubuntu at least was doing that automatically. On my most recent linux installation, however, I find that it's not sorting file names by pinyin order. I'm wondering if I have forgotten to install something this time.
View 1 Replies
View Related
Apr 6, 2010
Why should I concern myself only with a graphical front end rather than learning APT or RPM? Or are those really, really hard to learn?
View 7 Replies
View Related
May 19, 2010
I have a Dvd of Slackware as well as an Iso image of Arch.
All i know about the difference between Slackware and Arch is the stability, i.e. Slackware is more stable than Arch !
Is that all or there is some other difference which should be considered ?
Which one out of the above two, should i go for and why ?
View 14 Replies
View Related
Oct 25, 2009
trying to do a multiboot, just for fun Now I installed Foresight Linux, which was not such a good.Foresight is based on rpath and uses Conary as update system Now Conary destroyed all other linux systems installed on the other partitions. Now I found that there is something such as hide and unmount but have read several pages full of it but still have no idea what is the difference between the two and more important, how to use this as most explanations seem to complicated How can I hide partitions for a booted linux operating system so it is unable to see it, use it or even mount it when it tries
View 2 Replies
View Related
Jun 3, 2010
I've been using SuSE for a while and something has been bugging me. Not a show stopper, but nevertheless, an interesting one. Most tutorials, forum posts, etc. recommend using a sudo command to accomplish stuff. For example:
Code:
sudo make install
sudo vi file
However, this does not always work. For instance, I was recently working on a resolution problem with my ViewSonic VX922 - it would only display at 1024x768 rather than the native 1280x1024. Viewing some posts, I found the command "sudo sax2 -r". What I discovered is that there seems to be a big difference between sudo and su
Code:
drkhelmt@SPACEBALL1:">sudo sax2
root's password:
sudo: sax2: command not found
drkhelmt@SPACEBALL1:">su
Password:
SPACEBALL1:/home/drkhelmt: #sax2
SaX: Checking update status for intel driver
SaX: initialization already done
SaX: cal [ sax2 -r ] if your system has been changed !
SaX: startup
SaX: X server:0.0-> grant
SaX: importing current configuration
SPACEBALL1:/home/drkhelmt: #
So the question, why does the command sax2 (and others) work when after the su command rather than a sudo?
View 5 Replies
View Related
Nov 7, 2010
I'd like to clear up my misconception towards various types of installations. Is one better than the other? Do more senior people prefer compiling from source code? Hows does is compare to yum install or install from rpm?
View 7 Replies
View Related
Feb 12, 2010
On my ms windows machine, the OS went out of order, and I wanted to salvage all my pictures, and decided to use a live CD and move some of my media files to my mp3 player... its storage is 8 gigabytes I tried a latest Knoppix first, it did not provide me a nice GUI. Instead, it provide me with a humble looking, less than friendly, menu-based interface which I gave up on in about 3 minutes. I was thinking for a minute, and when I tried to install Ubuntu in the past, one of the options I was provided when I ran the Ubuntu installation CD was "Try Ubuntu without installing it" and I thought it meant the Ubuntu installation CD could also be used a live CD. And I put together an Ubuntu CD and attempted to use it as a live CD! ah man it was beautiful. It even recognized the video card on my machine. I am never going back to knoppix. From now on, when someone ever mentions Knoppix to me, my response will be, "what is Knoppix?"
View 11 Replies
View Related
Apr 6, 2011
Trying to understand version nr. of RPM package and release nr.I have the following package e.g.
tree-1.5.3-2.el6.x86_64.rpm.
tree ---> package name
1.5.3 ---> version
2 ---> release
e16 ---> operating system major version
x86_64 ---> cpu architecture
What is the difference between version nr vs release nr ?
View 4 Replies
View Related
Jun 17, 2011
just installed slackware 13.37... i did a bit of configuration by myself but im having trouble making my graphics card running correctly under X.I installed the latest drivers correctly from the nvidia website.
Here's the lspci:
Quote:
00:00.0 Host bridge: Intel Corporation 82845 845 [Brookdale] Chipset Host Bridge (rev 04)
00:01.0 PCI bridge: Intel Corporation 82845 845 [Brookdale] Chipset AGP Bridge (rev 04)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 05)
00:1f.0 ISA bridge: Intel Corporation 82801BA ISA Bridge (LPC) (rev 05)
[code]....
Right now with this .conf im able to start up X but find it not accelerated...
View 22 Replies
View Related
Jul 2, 2010
We are graphing various system parameters using Cacti. One of our graphs shows hard drive reads and writes. A question came up: why do we need this graph?
View 3 Replies
View Related
Aug 1, 2011
Doing some research I was leaning towards buying an inexpensive laptop and either install linux or buy one already installed (maybe Debian or Ubunutu). The uses for this laptop would be for developing linux device drivers and having the option to control the OS for any customized applications which I could develop. Didn't want to go the dual boot with Windows approach.
View 1 Replies
View Related
Mar 15, 2010
Need comparison of features and performance of Kickstart to Windows Deployment Service? (What do they have in common).
View 4 Replies
View Related
Jan 2, 2010
I realized that my understanding of UUIDs in Linux to specifying hard disk partitions may be erroneous.
The proverbial wisdom is that one should not use hard-coded device specifications in fstab and in the boot menu.lst, such as /dev/sda1 etc. The reason normally given is that if hard disk order changes or the order of partitions change, then the entries will be incorrect since they are hardcoded to partitions following a specific order.
So my understanding was that using hard disk labels, in the form of LABEL=xxxx, or UUIDs in the form of UUID=some-uuid, would prevent these problems when disk order or partition order changed.
I decided to avoid the use of LABEL in case I wanted to change the LABEL on a partition to make the names of partitions more easily identifiable. I then thought that UUID was ideal since it never changed for a partition no matter even if I moved that partition to another drive or added another hard drive and thus changes the order of hard drives on my computer. I essentially thought that once UUID was determined for a partition, it never changed but was somehow part of the partition in the hardware of my computer.
Then I became curious of how a UUID was determined. I did this because I often make backups of partitions on external SATA drives and wanted to make sure that somehow the backup would not duplicate whatever Linux considers the UUID of a partition and present a Linux distribution with two UUIDS which are somehow the same and therefore confuse the Linux distribution to the point that I could not use it. I am aware that UUID means a unique id, but I wanted to make sure I understand how that unique id is determined in Linux. This is especially true since the tool I use to make backups of an entire partition is a Windows application, and not a Linux application, and I wanted to make sure that the backup partition UUID would not duplicate that of an existing partition.
In my very brief research in how a UUID is generated under Linux it appears that it is not something that is part of the hardware of the partition itself but rather a number generated by some parameters of the partition, one of which is the partition order.
If it is, it means to me that if I move a partition from one place to another, even on the same hard drive, or to another hard drive, a Linux distribution will no longer find the partition based on the UUID. In that case it seems as if the UUID is subject to the same weakness as the device specification in fstab and menu.lst in that the order of a partition or the placement of a partition on a particular hard drive will cause the designation to no longer refer to the same partition. In which case it appears to me that only the LABEL parameter is not subject to this weakness and as long as I keep distinct labels for all partitions on my hard drive I could theoretically move them around at will and a Linux distribution will find them correctly. I am aware of course that my computer must always find the boot partition to be able to boot a Linux distribution, so moving Linux parttions where I want them is subject to the ability of my computer to find them from the MBR of my hard drives. But in the main it now appears to me that the best way to insure that moving partitions does not keep a Linux distribution from botting correctly is to use LABEL, and not UUID, in fstab and menu.lst, and of course to make sure that if I decide to change the LABEL of a partition that I must change its entry in fstab and possibly menu.lst before rebooting that distribution.
If I have been wrong in my latest surmises I would appreciate being corrected, as the information I found on UUIDs and how they are generated may not be correct. Also if there is more exact information on exactly how partition UUIDs are generated in Linux I would appreciating anyone pointing it out to me.
View 10 Replies
View Related
Mar 24, 2011
I have a debian linux on my server. My disk space is only 10GB. When I check the space usage with discus program, it says:
Mount Total Used Avail Prcnt Graph
/ 9.39 GB 8.30 GB 1.10 GB 88.3% [*********-]
+ib/init/rw 124.3 MB 0 KB 124.3 MB 0.0% [----------]
/sys 0 KB 0 KB 0 KB 0.0% [----------]
/dev 120.1 MB 92 KB 120.0 MB 0.1% [----------]
/dev/shm 124.3 MB 0 KB 124.3 MB 0.0% [----------]
But when I use this command:
du / --max-depth=0
It says:
1860864 /
Why the stats of discuss is not like du command?
View 5 Replies
View Related
Jan 19, 2011
I have to work with a NFS user id between two hosts: A running Ksh 93 and B running pdksh 88. Both host run RedHat. My problem has to do with the custom prompt I created on A: it works like a charm and display colors:
Code:
PS1="$'E[46;31m'`logname`@$'E[1;33m'`hostname -s`:$'E[0m>"
But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".
Code:
$'E[46;31m'NFS_user_name@$'E[1;33m'host_name_for_B:$'E[0m>
The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end
Code:
export NODE=`uname -n`
case $NODE in
host_name_for_B)
[code]...
The case statement does not work: PS1 does not switch to `PS1="[`logname`@`uname -n`]>"`.
View 1 Replies
View Related
Feb 7, 2010
Does kde3.5 differ much in memory requirements from kde4? I'm running kde4 on an old thinkpad with 256mb ram and everything is a little slow...
View 8 Replies
View Related
Mar 16, 2010
I have a third party static library (libSTATIC.a) that I cannot recompile into a shared library. I want to create a shared library (libSHARED.so) that uses the C functions in the static library. Is it possible to do this? In other words, when linking a C program with gcc by using the -shared flag, is it necessary that all all libraries invoked in the program (even low level libraries such as libc for example) be available as shared libraries as well?
View 2 Replies
View Related
Feb 9, 2011
I am having vitural hosting around three websites using Centos. I need to type in the full domain name include www to enter the 2 of the vitural hosting sites. Pros and Cons of vitural hosting vs separate machine? I got a questions about static IP. Assume I having a linksys router with port forwarding function, I have three seperate machines with different private address connect to the same linksys router. Can I entry all private address forward to port 80? Does it work? If I insist to host website on three machines, does that mean I need 3 static IP and 3 linksys router? I got two conventional web services only showing information but one got mysql db for user to input data, thats why I asking if it is good idea to seperate web page on different machines.
View 14 Replies
View Related
Feb 21, 2011
This is my first Linux experience so probably at the prenewbie level. I have installed Xubuntu and played with it for a couple weeks. The question is about software download attempts from Ubuntu Software center. When I attempt to use it I get the error messages:
Failed to lock the package manager
Check if you are currently running another software management tool, e.g. Synaptic or aptitude. Only one tool is allowed to make changes at a time. The package indexes are currently changed by apt-get. Does this mean that SPM is active and the Software Center will not function until I change enablement between the two? If so, how do I accomplish the task?
View 6 Replies
View Related
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
Jul 17, 2010
below are the details of my system. I have bash as my current shell, some really common commands aren't working.
Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])
Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$
[Code]....
View 13 Replies
View Related
Oct 15, 2010
I admit this has been a particularly bad year for me, but it isn't THAT unusual by my standards. I typically spend I would reckon quite honestly about 70-80% of my time with computers just fixing stuff up that either I broke or was broke in the first place. Usually it's the latter by some considerable margin. That's really inefficient, isn't it? I just wondered what others' experiences are of this phenomenon. Obviously I don't do computers for a living or I would have starved years ago. So what is the Panel's consensus view on the percentage of wasted time we should expect to spend, on average, "running just to stand still" on maintenance tasks?
View 5 Replies
View Related
Dec 3, 2010
What happens when the script executes is that the ssh connection works and parks me at the remote hosts's shell login. Therefore, the "firefox" command refuses to execute. I need to know how to make the "ssh" connection occur, stay open, and go into the background so that the rest of the script can execute.If I could also do this with the "firefox" line so that the entire term window could be closed would also be helpful.
View 3 Replies
View Related
Sep 10, 2009
As Linux gains in popularity, (as I believe it will), do you think that Linux will ever become the target of as many virus and worm threats as Windows has faced? If so, do you think that the threats will have much success?
View 2 Replies
View Related
Jan 17, 2010
I found from command 'top' that 8GB memory are used. However, using command 'ps' with some options to grep the running processes and then summing up the memory used by the running processes are less than 2 GB. Where has the used memory gone ?
View 7 Replies
View Related
Dec 30, 2009
In F11 to run PolicyKit I entered the following at the command line.
polkit-gnome-authorization
In F12 this doesn't work. I get an error message "command not found"
How do I access PolicyKit in Fedora 12?
View 2 Replies
View Related
Dec 19, 2010
I'm on Ubuntu 10.10
I was using K3B the other day and could not find an option to rip a CD to mp3 files instead of ogg. How can I do this?
View 4 Replies
View Related
Jun 15, 2011
I just built a computer with a MSI 760GM-E51 Motherboard, AMD Phenom II 955 CPU and 4 GB memory (2 x 2 GB G.Skill DDR3-1333 PC3-10666) I first installed 10.04 LTS 64bit. But I think I am going to go to 11.04. I am just looking for a vote, would you install 32 or 64 bit. I am not a real power user, biggest thing I would do would be video editing. If I am going to play resource demanding games, I would probably boot into XP.
View 6 Replies
View Related