473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

command that can use to acess a line from a file in unix

i wt a command that can use to acess a line from a file in unix
Oct 22 '07 #1
6 1752
MarkoKlacar
296 Expert 100+
Hi,

you want to read just one specific line from a file, right?
Not quite sure I understood you...

Cheers
Oct 22 '07 #2
numberwhun
3,509 Expert Mod 2GB
i wt a command that can use to acess a line from a file in unix
First, you really need to be more specific and descriptive about what you are wanting. Second, please do not use SMS texting shorthand in the forums if you can help it. We are not limited to any number of characters like SMS is and in doing so, you make your posts more difficult to read and understand.

Regards,

Jeff
Oct 22 '07 #3
Hi


Yes , I want to read just one specific line from a file.
Oct 23 '07 #4
Colloid Snake
144 100+
Hi


Yes , I want to read just one specific line from a file.
Have you decided if you are using a shell script, awk, sed, some other language (python, perl, c++, java, etc...)?

As a shell script I believe you can load all the lines of a file into an array or some other container, but it would probably be easiest to Google something like "shell scripting file io" to figure it out.
Oct 23 '07 #5
pbmods
5,821 Expert 4TB
Changed thread title to better describe the problem (threads whose titles do not follow the Posting Guidelines actually get fewer responses).
Oct 23 '07 #6
ghostdog74
511 Expert 256MB
i wt a command that can use to acess a line from a file in unix
if you know the line contains some strings you want to find , you can use grep/sed/awk etc for that.
if you know the line number,
Expand|Select|Wrap|Line Numbers
  1. awk 'NR==5{print}' file
  2.  
Oct 24 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Christian Long | last post by:
Hi I'm trying to pipe data into a python program on Windows 2000, on the command line. Like this: dir | myProgram.py Here's what I tried:
4
by: lkrubner | last post by:
I'd like to write a PHP script to be used from the command line on a Unix machine. I'd like for the script to put together a string, turn it into a web page, print it, then return control the...
2
by: SunRise | last post by:
Hi I am creating a C Program , to extract only-Printable-characters from a file ( any type of file) and display them. OS: Windows-XP Ple help me to fix the Errors & Warnings and explain...
14
by: kdv09 | last post by:
Hi! I'm looking for some help in fixing my screwup: I've got C++ app which reads MDB database, using MFC CDatabase and CRecordset derived classes. I had it working OK on development PC (Win XP...
7
by: John F | last post by:
Not exactly a C question (sorry), but I couldn't find a ng that seems more suitable... On the Unix shell command line I can successfully write cc -DPATH=\"abcd/\" program.c -o program to...
40
by: raphfrk | last post by:
I have a program which reads in 3 filenames from the command line prog filename1 filename2 filename3 However, it doesn't work when one of the filenames has spaces in it (due to a directory...
13
by: Pieter Edelman | last post by:
Hi, I'm currently writing a command-line program in Python, which takes commands in the form of: ../myprog.py ARGS So pretty standard stuff. In my case, ARGS is a list of image files. One...
2
by: Jim | last post by:
Hello, I need a program that will traverse a directory tree to ensure that there are unix-style line endings on every file in that tree that is a text file. To tell text files from others I...
3
by: Vik Rubenfeld | last post by:
I'm developing a web site in PHP for an Apache server. I have a particular stand-alone application that takes a text file as input, and produces a text-file as output. It's usually run from the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.