All I want is a command that reads one data file with several columns and prints it in another one.However, whenever the value in one specific column alters, it prints one empty line in the new file. For example, consider the file
I have a question, i accidentally formatted an lvm volume as ext2 after creating it. Then of course, we copied a ton of data to it before I realized it was ext2. (I guess ext2 was the default when using mkfs without a -t) Anyway - can I just use tune2fs -j on the LVM just like I would a /dev/sdx device?
I've lost my admin password on my current Windows OS and would like to install Linux Ubuntu or a similar user-friendly distro of Linux alongside, see how that goes and possibly reformat my PC with Linux as I was told it would convert NTFS formatted drives to ext3, not delete them.
i use this script to get the time and date of back and fourth transactions for a particular execution id. I use a substr command on the 5th column to to cut the milli seconds off the time value. - otherwise the times would look like 08:30:04.235
Each line represents a portion of a data matrix. I want to convert the numbers after the "=" to the range of that partition in the matrix such that the output file looks like this:
I have 4 Linux machines with cluster.My target is to find all kind of IP address (xxx.xxx.xxx.xxx) in every file in the linux system remark: need to scan each file in the linux system and verify if the file include IP address if yes need to print the IP as the following
I would like to make a file with all these data in one column, like
a1 a2 . .
[code]....
Can it be done with awk or some other command? Also, is it possible then do add another column in front of this one with numbers of the lines (for every previous column), like
I've come across an unusual requirement for a service in my Ubuntu system.Simply put, I need to find a way to search for all instances of a term in a file, delete lines containing containing that term, and delete four lines below each instance of that term. ither that, or copy the entirety of a file to a new file and skip over all lines containing the term plus four below it.This sounds kinda weird, I know. Without going too far into detail, I either have to change the logfile format for a server I'm running which is a huge pain in the butt, or I can just run a script to edit an HTML report generated from said logs. (Said report is really just for managers to peruse, and I like my log format, so I'm pursuing option 2.)
Can't change the Plasma-Themes in System-Settings/Desktop-Theme Detail any more!Changed the user,same behaviour ("Apply"-button not highlighted after selecting a theme)!And more confusing,in the System-Settings/Appearence/Style/Workspace setting,there I can changethe Plasma-Themes !Downloaded a Plasma-Theme before from Kde-Look.org,that seems not to work,deleted it,but no changing.
I am trying to create a shell script to automate a process that takes inputs from two sets of data. The variable SHELL in my system echoes as /bin/tcsh, but I see that my /bin directory has other possibilities, such as bash. So, if changing the shell could simplify my problem, then I would go with that.
I have a list of files containing data about objects, say obj1.dat, obj2.dat, .... objn.dat, where n is around 20 (it varies). These objects belong to a few different categories, and there are files detailing the properties of the categories, say cat1.prop, cat2.prop, ... catm.prop, where m is smaller than n (more than one object in each category).
I know that shell scripts can handle 2-d arrays, although I am not sure how. The thing here is that category 1 could have 5 objects and category 3 could have 7 objects. So, this could produce a 2-d array, but not a rectangular one. I need to process these files taking into acount the data about the object and the properties of the category the object belongs to. Here is what I tried to do:
# First I enter a list of category names and m lists of objects in each category category='cat1 cat2 cat3 ... catm' cat1-obj='obj1 obj2 obj3' cat2-obj='obj4 obj5' cat3-obj='obj6 obj7 obj8 obj9 obj10' . . . catm-obj='objx objy objz objn'
# The lines above show the irregular 2-d array. Then I try to trick the script into parsing through this irregular 2-d array: for i in $category do data='$i -obj' for j in $data do mycommand $j.dat $i.prop > $j-$i.out done done
The line "mycommand $j.dat ..." is just the line that processes the information. That has been tested to work fine. Feeding the information to this is what does not work. The lines " data='$i-obj' " and " for j in $data " do not have the desired effect. I have tried other ways, like data=`echo $i "-obj"` and things of the sort, by to no avail.
In summary, I am using openSUSE 11.2 x64 on an Acer laptop with a wireless AR928X card. I can connect to my WEP-secured network when I boot up. After some time (it might be minutes, it might be hours), I am prompted for my WEP password again. This never works, despite being the one which gets me on-line at start-up!. The only solution is a reboot. The problem is intermittent and doesn't seem to depend on my on-line activity. I have tried the following with the same result: KNetworkManager Traditional using IFUP Enabling / disabling IPv6 support
I tried installing the compat-wireless package through YaST and then managed to get no internet connection at all. Went back to KNetworkManager and things "worked" again until I was prompted for the WEP code. I have openSUSE 11.2 x64 working on my office laptop without problem and can connect to my home network without any problem. My issues are with my personal laptop. I have reached the stage of booting into Windows 7 as my default option so that I can access the internet reliably. What I can do to diagnose and repair the problem - could it be that the card is going into powersave mode? If so, how do I stop that happening? I'd prefer to be on openSUSE but need to be able to rely on the internet.
I'm trying to use convert, I have installed the imagemagick. I use this line:convert *.jpg test.pdf but I'm only able to convert to pdf 1 single jpg file, not multiple files at once. When there's more than one file, I get the following error: Segmentation fault
While install Ubuntu on an existing xp pro I accidentally formatted my hard disk. Is there any way to get back my files it contains e books pdfs photos music files and movies. Data recovery. My Hard Disk 80GB SCSI NTFS.
I have recently inherited an old xseries eserver 220 with 1.2ghz intel pentium III processor. I can boot puppylinux fine from the cd, but puppylinux does not see the hard drive even though it shows up in the bios sysutilities and I formatted the hard drive from the bios.
I have not defined a user vimrc, OS is redhat 4.6 and after a search and replace the first column in the editor is highlighted yellow and it stays that way as I close and open vim. This is the /etc/vimrc that came on the system. anyone see a bug or a reason it would do that?
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" set fileencodings=utf-8,latin1 endif set nocompatible " Use Vim defaults (much better!)
1. when we run od command it displays octal values. But the first column will be always 000000. after that the actual file contents are displayed. Can anyone tell the meaning of that.
2. When we run ls -l command, in the first line of the output, we can see some integer value. What is the significance of that value.
this awk statement only returns the first line, and i cant seems to make it perform in a way to match based on keywords like GREP. Is there any way to make display the other lines which contains "google" also?
It is very important for my research work. For example mydata.txt: id type x y z 1 6 0.474611 0.227223 0.583947 2 4 0.422894 0.22726 0.536791 3 5 0.448963 0.200148 0.560336 4 3 0.386478 0.207721 0.515293 5 6 0.371617 0.22361 0.582206 6 4 0.32123 0.222999 0.534782
How to change second column (type) whose values are 4 and 3 to value 1, so that mydata.text file become: id type x y z 1 6 0.474611 0.227223 0.583947 2 1 0.422894 0.22726 0.536791 3 5 0.448963 0.200148 0.560336 4 1 0.386478 0.207721 0.515293 5 6 0.371617 0.22361 0.582206 6 1 0.32123 0.222999 0.534782
I need to replace a value in a file. For example the content of data.txt file is: 1 1 23 2 1 42 3 2 52 4 2 62 5 1 77 6 1 88 7 2 99 8 1 100
Could I substitute 2 in second column with 3 using awk and or sed or other command so that the data will be change as follow? 1 1 23 2 1 42 3 3 52 4 3 62 5 1 77 6 1 88 7 3 99 8 1 100
In what started as a quest to get free wifi, I have recently gotten in way over my head. After unsuccesfully trying to use a virtual drive, I decided to erase my HDD on my laptop completely, wiping out my Windows XP and installed Backtrack 4 in it's place.
My goal amongst others, was to create a 20% partition for Backtrack and run XP on the rest of it. Well, I couldn't figure out how to do it. My only option was format and install backtrack.
So now I'm typing on my iPhone cuz I know absolutely nothing about Linux or how it works. My computer has no Internet. It doesn't recognize my Ethernet NIC, my wireless card and probably alot of other stuff.
SO ANYWAYS I don't want to give up. I'm ready to learn. I guess the first order of business is to get my Ethernet Card working so I don't have to type on this damn phone. So how do I do it?