Programming :: Cannot Capture - No At End Of File Store It And Print It Using Sed And Awk
Nov 25, 2008
How to write a shell script the would search for a phone no using at the end text file using sed or awk and store it in a varaible or print it.
The text file is in this form
The first line may take any form but the last line will always be Firstname Lastname:KEN:+254456789
I would like to seach for the Phone and store it in a variable and print it.
The phone no will alway be preceeded by ":+"
View 10 Replies
ADVERTISEMENT
Feb 15, 2011
I'm working with Radiotap headers right now. I want to get the RSSI data. I came through a problem that I can't figure out right now.The value that I need to get is:
Code:
s8 IEEE80211_RADIOTAP_DBM_ANTSIGNAL
now, when I printf it:
[code]...
View 4 Replies
View Related
Mar 4, 2010
i m trying to store h.264 in avi container using ffmpeg....is it possible using ffmpeg.i m using v4l to capture a image and compressed in to h.264, how i can store it in avi container,any programming example,header format for avi container,and what other information required to store in a container.
View 14 Replies
View Related
May 25, 2009
I am writting a program that reads a text file (music.txt) & stores it in a Data Structure. I am a novice learning over the internet so I this is something I have never done. How do I do this?
Quote:
Write a program that reads the data from the music.txt file and store it in a data structure. To implement this data structure you must use an array of songs and each song must be represented by a struct with appropriate fields. So far all I can do is open to file to read it (very simple I know) but so far is it correct?
Code:
#include <iostream>
#include <fstream>
#include <strstream>
[code]....
View 3 Replies
View Related
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
Jan 25, 2010
I wanna learn how to store data in text file and be able to modify it and save as well using C++.
Note: im using Turbo C++ 3.0
View 9 Replies
View Related
Dec 9, 2010
Is there any simple example on how to take a screen cap and save it to a file?
View 11 Replies
View Related
Feb 8, 2010
I am running Debian on a 4 years old pentium machine. I have recently switched from Windows to Linux, so I'm still preferring the graphical user interface (Gnome is very good for me).
Now my problem: My harddisk becomes too small for the data I am storing and processing (pics, music, videos), and I would like to fit a larger one. So afterwards, I will need to reinstall debian and all the software I now have in it. How can I store a list of the currently installed software? (I can view it with the gnome apt software manager (also with synaptic), but I did not find a way how to store or print it).
Or, could I possibly save the whole system on an external harddisk and restore from that afterwards, as I do with the data?
View 10 Replies
View Related
Apr 12, 2010
I have this code:
How can I print &FARAchieved to a file? Or, printing the whole bioReturn would be fine too.
View 8 Replies
View Related
Feb 26, 2009
I want to write a script that returns me name of the files that begin with the specified characters. like
Script out should be
View 3 Replies
View Related
Mar 20, 2010
why this code can't print in the while loop the content of the file ?
Code:
#include <stdio.h>
int main()
{
FILE *fp;
[code]...
View 7 Replies
View Related
Mar 4, 2011
I am using an awk command to print a line from a cvs file.the awk command includes an if statement that filter the output-lets say i want to print all the lines that the price field is greater than 30.i have it working when i put the parameters myself.. but when i try to send them with vars it wont work..i am sending the sign of the if statement - can only be: == , < , >it looks like this:
cat file.csv | awk -v sign=">" -v field="2000" '{if($3 sign field) printf "%-12s%-12s%-12s%-12s
",$1,$2,$3,$4}' FS=,
the bold part is the problem , because when i put the sign parameter myself t works great.. i guess its a chars issue but i cant spot it
View 3 Replies
View Related
May 15, 2011
I having the following awk line in a script, is it possible to modify the script so that it create a the directory if it dosnt exist (similar to mkdir -p) awk -v datum="$DATUM" -v workingdir="$workingdir" '{ sub("\[.*","",$5); print > workingdir"/"datum "/" $5;}' $1
View 1 Replies
View Related
Nov 27, 2010
How do I do this?The script below obviously dosn't work.
#!/bin/bash
for u in $(awk '{print $2}' user.txt)
for i in $(awk '{print $1}' user.txt)
[code]...
One text file with two columns in it, I need to iterate through the file and print the different columns each time
View 9 Replies
View Related
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
Mar 15, 2010
I have a problem when using awk:
e.g: awk '{processing text}' File1 > File2
But when I'm processing the File1, I want to print out some messages to the screen (not the File2). How can I do that?
View 5 Replies
View Related
Dec 25, 2010
How can I print the current time of my system with a batch file. My os is ubuntu.
View 4 Replies
View Related
Feb 7, 2011
I have a problem with arrays in awk. What i want is to take some data from a file (ssh log) and print it to a html table. I have managed to print some stuff (user logged in and how many times they have logged in) What i want more is to take all the ip that each user logged in from and print it in a row next to the username and times (in the code i typed blabbla where i want the ip to be shown. How do you think i should approch that, multidimensional arrys maybe?
Code:
View 14 Replies
View Related
Oct 4, 2010
Its my first post in here so please be patient I am trying to use regex in perl script to detect allowed words from the file and then print output to the screen.
As an example : I have text file with orders and returns :
Item2-SKU-2-11.08.2010-online
Item3-SKU-3-11.09.2010-return
Item4-SKU-4-11.09.2010-store
My question: is it possible to make sure that i am ony outputing to the screen orders based on few conditions like Item,order form e.g. online.And is it possible to have multiple matches (Item2 only diplay if ordered online etc)
View 1 Replies
View Related
Aug 14, 2010
Just installed drivers for Lexmark pro200 - S500 series. However although it is recognised by the system and has a tick by its name, And tells me it is connected via usb file goes to print que but will not print. Also tells me it is Printing - localhost! is this correct?.
View 1 Replies
View Related
Dec 8, 2009
I have two students whose windows laptops are riddled with malware and not working properly. They want me to help them install Linux (which we use in school), but they are concerned about their iTunes.
Having avoided iPods as "defective by design", I know nothing about iTunes whatsoever. However I remember reading about DRM locking and such problems that have me concerned that I won't be able to do it.
Where does iTunes store its stuff?
Can I copy its data store to an external drive, and then into a linux home?
Then will it work on wine, or can another manager (rhythmbox etc) access the itunes data?
Alternatively, if I partition the drive and install linux, can rythmbox/wine/something access itunes data on the win partition?
Supposing they are buying music through iTunes, what will happen to that account?
Finally, one of them has an iphone. Does that work with linux?
Ironic that an apple application is blocking migration away from windows.
View 9 Replies
View Related
Oct 13, 2010
How does ubuntu live cd work? 1) If download a file does ubuntu store the file in the ram?2) How abt installing software in the live cd?
View 2 Replies
View Related
Apr 13, 2010
i have a loop which produces new value everytime it runs. i want to store the results in an array. how can i do dat??
loop is like:
a=0
declare v
while ((....))
do
v[$a]="$r"
let a=a+1
done
while doing this it is not treating v as array but as variable and it is overriding the value and old value is lost..i am using bash shell version 3.00.15
View 5 Replies
View Related
Jan 28, 2010
Code:
ls Again the command can be stored in a variable and then executed. Like
Code:
var=ls
&var
The above two codes are the same. The problem occurs when we try to pipeline it. Consider the following problem:
Code:
ls | grep *
works fine...but when we try to store it in a variable and run the command there is an error.
Code:
var="ls|grep *"
$var
how to store this kind of commands in a variable?
View 11 Replies
View Related
May 19, 2010
writing a code in C program for debugging error and sendingror messagein routingprotocols. please answer with code
View 2 Replies
View Related
Jul 30, 2011
I am trying to store the data in my program in a map of priority_queues an I am having a bit of trouble doing it. basically I am storing activities (ie watching tv, eating dinner, playing ping-pong, etc) and I want these event grouped by the day that they happened on.
my first thought was to use a multimap where the key is the date, and the value is the activity, however I would like to keep the activities in a specific order. I have tried to find the proper syntax for this but have frustratingly come up empty. Even google provided little assistance.
View 9 Replies
View Related
Apr 29, 2010
How do I do this? I wish to store the pictures via a "Browse" button on the webpage, and later display them on a particular page on the site.
View 2 Replies
View Related
Jan 20, 2011
I need to find one RUNNING word in latest created logs.
and as soon as i will get RUNNING WORD , i have to execute another Unix Command.
I wrote following script code...
View 3 Replies
View Related
Apr 13, 2009
I am working in DM355 board. CPU is armv5t. I am asked to record the video thats coming from camera using rtsp. I can record the video file in avi format on /opt directory on dm355 target board. Now I have to store this avi file in nas server. My nas server ip is 192.168.1.250. Linux pc,DM355 target board and NAS server on same network. How to write the program to store avi files from DM355 to NAS server.
View 2 Replies
View Related
Oct 30, 2010
I am working on an structure program and i have to represent a 2,4 tree in a class in Java using single int array and make the insert and delete functions .
View 1 Replies
View Related