Programming :: Remove Everything From Starting Until Some Keyword?
Mar 24, 2011
I have a multiple txt file in one folder. I would like to remove everything from starting until find string keyword in one folder. Here is the sample of my text:
Code:
5a651a62sf1a54f2a1sf6a4f50a5f4a2f1a2d1sfs11231211f61d021sd1fs1Reassembles21f2sdf122dfs21fs212sdfdsf1s65f1s62f1
So i want to remove everything from starting until reassemble. Here is the sample output:
Code:
s21f2sdf122dfs21fs212sdfdsf1s65f1s62f1
I have multiple file in one folder. So how to use any script to read in one directory folder and do a same task. I prefer using awk, sed or perl.
View 5 Replies
ADVERTISEMENT
Apr 10, 2011
I have a file and at some point in the file the string "DONE" appears (it's unambiguous). I want to redirect all that is coming starting from the next line to a new file. How do I do that?
View 6 Replies
View Related
Dec 5, 2010
im using
Code:
scons prefix=/usr qtdir=/opt/qt4
to configure and i get these compilation errors
Code:
scons prefix=/usr qtdir=/opt/qt4
scons: Reading SConscript files ...
Platform: Linux i686
scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/mixxx-1.7.2/SConstruct", line 42, in <module>
WE ARE IN: /mixxx-1.7.2/linux_build
QT path: /opt/qt4
Loading qt4 tool...
[code]...
ive been scratching my head at this one for days, i turned on the ubuntu virtual machine and checked what apt wanted to pull, and im suspecting that i need to find the source versions of several packages in regard to qt4 and libqt4 and various libqt4 extensions.
View 4 Replies
View Related
Apr 15, 2010
I am using latest GCC version GCC4.4 in my linux. my code snippet:
auto const char *ostr = ((int *)node)->str;
When i compile this, i get an error as follows:
error: auto will change meaning in C++0x;
View 13 Replies
View Related
Jun 16, 2011
I tried Kubuntu for few days.now I removed kubuntu using remove kde desktop,autoremove commands.Everything is fine.I also selected gdm,removed kdm.Now I dont find Kubuntu in options in the login screen.I also removed all kubuntu applications.But now when I turn on and off my computer, I find blue kubuntu screen.why is that happening even after removing kubuntu?did I do some mistake?How to remove it?
View 2 Replies
View Related
Feb 17, 2010
Yesterday i finally got around to installing my graphics card (NVIDIA GeForce 8400M CS) on fedora 12 by using the command yum install kmod-nvidia the terminal then told me that it installed correctly so i rebooted my system. Now when i boot up into fedora, it loads and when the sign in window is about to appear instead my screen shows random colors all over the place. I am hoping someone can tell me how to remove this via the command line prior to actually starting fedora.
View 2 Replies
View Related
Apr 21, 2011
I want to list all installed packages by keyword. For example I want to know what packages were installed related to "game". How can I do that in Fedora?
I tried 'yum list installed', 'you search' ... but still can't find a solution. I'm not a yum expert .
View 2 Replies
View Related
Mar 17, 2011
This used to work by default in previous versions of FF.
imdb $movie
wiki $some_topic
now they don't.
My personal favorite was
man $page
Open about:config and search for keyword.URL - it should be blank. Double-click to edit and enter
Code:
[URL] This will restore the previous Firefox keyword search behavior. No restart necessary.
View 2 Replies
View Related
Jul 10, 2011
I've set up a sandisk usb stick to boot/install 11.04. On two eepc netbooks I get the same issue when I try to boot from the usb: SYSLINUX 3.63 Debian 2008-07-15 EBIOS Copyright 1994-2008 H Peter Anvin Unknown keyword in the configuration file
View 3 Replies
View Related
Mar 19, 2010
I'm working on RHEL5 dealing with AS (ActionScript) files in Linux GVIM Editor but everything is in blue color. Can i set color coding for my keywords?
View 3 Replies
View Related
May 16, 2010
I need to write a script that can search up to 3 parameters and find all files containing those words. then display them and the amount of hits it got.if the first parameter exists, then we can assume we are looking for the word supplied.if the second parameter exists, then we are looking for files with both keywords.if third parameter exists test the second parameter for the values ('and', 'or', '-v') and search accordingly. These are the only values accepted as the the second one when 3 parameters are present.
lastly, if there are zero or more than three parameters echo as an error and when 3 parameters have been entered we echo an error when the second parameter is not one of the following: 'and', 'or', '-v'.
View 1 Replies
View Related
Jan 12, 2011
recently got this message when USB booting:Unknown keyword in configuration file: gfxbootI used to have the "Unknown keyword in configuration file: ui" problem, which was spread throughout the forum. I know people have fixed it by removing the "ui" in the config file. This is what I did in /syslinux/syslinux.cfg
# D-I config version 2.0
include menu.cfg
default vesamenu.c32
[code]....
View 3 Replies
View Related
Oct 17, 2009
The owners manual of my monitor gives me the following informations:
When editing my xorg.conf, do I have to add the automatically 'keyword' ? (saw nothing about it in man xorg.conf or man nv)
View 6 Replies
View Related
Jul 20, 2010
I read that ZONE_HIGHMEM (high memory) in linux starts from 896MB. Why it is starting from 896? what is the reason behind that?
View 1 Replies
View Related
Mar 28, 2010
I've been recently interested in shell scripts.. and my friend wants me to create a script that allows you to ping.Ive been trying to find info about how i could set this up but found nothing..also all i really need to create a shell script is the note pad and set it as a .bat file?? or do i need a program to make a shell?
View 8 Replies
View Related
May 15, 2011
I tried, of course:
Code:
awk '/^./ {print}' FILE.TXT
That does not work, I just get an empty output, even if FILE.TXT contains lines which fit the desired regexp I've searched but did not found my way. I'd like to do it with awk, as I want my program to rely only on awk, nothing else such as sed, grep, etc.
View 12 Replies
View Related
Nov 10, 2010
I created a small C++ program which starts a server in a separate thread and waits the user to press q using the standard input/output. Something like:
Code:
printf(...);
server->Start();
[code]....
View 8 Replies
View Related
Oct 25, 2010
I'm having problems installing Ubuntu 10.10 Netbook onto my Asus 900. I downloaded the .iso then used the "make startup disc" feature in my Mint 9 desktop machine to make a usb install disk. All appears well at that point. When I try to boot from the usb stick, I get an error message as follows:
"SYSLINUX 363 Debien-2008-07-15 ......
Unknown Keyword in Configuration File
boot: "
and the cursor just hangs there and doesn't respond to the keyboard.
I also tried it on another Asus and a Gateway Laptop with the same results.
My intention is to have this the sole OS on my little Asus 900.
View 4 Replies
View Related
Dec 14, 2014
I'm trying to start Chrome in kiosk mode from a systemd service on boot. The 'webserver app' named 'xx' in the samples launches but chromium never comes up.
xx.service :
Code: Select all[Unit]
Description=xx Service
After=syslog.target
[Service]
Environment="DISPLAY=:0.0"
Type=forking
WorkingDirectory=/usr/bin/xx/
ExecStart=/usr/bin/xx/xx
ExecStartPost=/usr/local/xx/chromium.sh
Restart=on-abort
[Install]
WantedBy=multi-user.target
chromium.sh
Code: Select allchromium-browser --kiosk http://xx-01.local:8081 &
View 1 Replies
View Related
Jun 8, 2011
How can i use different starting and ending delimiters in awk to search for strings or numbers like:
:string"another_string
'number+another_number
now i want string and number as output from above lines. But if i use delimiter as : or ' it will print the entire line coz second delimiter is not same as first one.
View 4 Replies
View Related
Mar 14, 2010
So, DnD is cool - and in Java, it works. Just set the component where the drag starts to allow that:
Quote: tblMain.setDragEnabled(true);
and - yes - the rest pretty much runs itself. I have a JTextField that happily takes the drop from the JTable (be it the whole row - I'm not there yet, still working on that)...but does not raise any events. I'd like the JTextField to raise an event:
- cleaning up the received data, now it gets the raw stuff, and I need an ID from that string
- starting up another void() with the received ID
I read the tutorials but - for blisters - cannot see the "light", please shed some (light, that is)
View 1 Replies
View Related
Jun 23, 2011
I am loading the file in Fortran. File looks something like this (shown below) I am interested in Velocity values and not Pressure values. Is there a way to code in Fortran which finds the staring LINE of Velocity values and ending LINE of values or I have to manually find the lines? IN this case it should return Starting line : 9 Ending line: 11
PHP Code:
[code]....
View 2 Replies
View Related
Jan 17, 2009
I have an old-address-list file which is having around 1500 entries. I need to convert this addresses in to a specific format.
The old-address-list file>
# cat old-address-list-file
dn: CN=Muhammad Hadhi K.M,OU=IT Dept,OU=Example Company H.O,DC=example,DC=com
cn: Muhammad Hadhi K.M
[code]....
View 6 Replies
View Related
Apr 27, 2010
I have a filename file-name-here-1.2.3-i486-2.tar I would like to know how to remove the last two fields leaving only: file-name-here-1.2.3
I can use:
x=file-name-here-1.2.3-i486-2.tar
echo ${a%-*}
to remove the last field (after -) but how do i remove the last two in one fell swoop?
View 2 Replies
View Related
Jun 27, 2010
I have a string like this "/home/test/filename.txt" and i want to delete all character after the last "/". how to do that using sed or awk.
View 5 Replies
View Related
Nov 3, 2010
How can I remove all lines which contain A,,,,,, I tried the following sed statements but no luck.
Code:
sed "/A,,,,,,/d file"
sed "/A,,,,,,/d file"
View 6 Replies
View Related
Feb 24, 2010
which is the simplest way to have first and last character cropped out from a string? Something simpler than
Code:
echo $STRING | cut -b 2- | rev | cut -b 2- | rev
View 6 Replies
View Related
Nov 18, 2010
This is my file, named xxx.c. And there are two functions in it.
[code]...
When I try to compile the whole project, I used -ffunction-sections,-fdata-sections to generate the .o files, use Wl,--gc-sections -Wl,--print-gc-sections to link to the exacutable file. gcc 4.3.2 ld 2.18 Debian 5 After the first time I compiled it, I got a list of Removed functions. But one second later, I rememberd that I forget to close the Compile Switch: Debug. Then I had to recompile it and got another list. Compare these two lists, I found that , bxx isn't on the second list. First I guess that bxx is a debug function but never used in debug mode, and it won't be compiled in release mode. I check the source and find that there was no compile switch for bxx. But it's caller function axx, is removed, both the debug switch is on and off. I try to compiled the project for several times , but the result is the same. I can't realized it , why? Is that the --gc-sections won't remove all the functions not used?
View 4 Replies
View Related
Apr 8, 2010
I was preparing a script which will remove all my files from directory which are 24 hour old.I tried some thing like thisfind . ( -name 'log.*' -mtime +1 ) -exec rm {}; but it is throughing error like : missing argument to exec.
View 8 Replies
View Related
Apr 25, 2011
I have tried this a million ways, got it to work once but it didn't work sitewide for some reason. I have a url: [URL] and I want it to be found by going to: [URL] I am using this
Code:
RewriteCond %{REQUEST_URI} ^/agents/tp/
RewriteRule ^([^/]+)/?$ agents/tp/$1/index.php [L]
and have also tried something as basic as
Code:
RewriteCond %{REQUEST_URI} ^/agents/tp/
RewriteRule ^(.*)$ agents/tp/$1/index.php [L]
I keep getting "The requested URL /JoeAgent/ was not found on this server." why it's not working?
View 4 Replies
View Related