Sponsored Content
Full Discussion: read() contents from a file
Top Forums Programming read() contents from a file Post 302601633 by acdc on Friday 24th of February 2012 05:53:24 AM
Old 02-24-2012
thanks a lot for this Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read File and use contents to rename another

Hello guys, thank God that I found this forum. I hope that someone can help me because I don't have any idea on how to start it. I know that for some of you this is a very simple task but I'm not as advance on shell scripting like many people out there. I got this file with a permanent... (10 Replies)
Discussion started by: Shark Tek
10 Replies

2. Shell Programming and Scripting

how to read the contents of a file using PERL

Hi My requirement is to read the contents of a fixed length file and validate the same. But am not able to read the contents of the file and when i tried it to print i get <blank> as an output... I used the below satatements for printing the contents ... (3 Replies)
Discussion started by: meva
3 Replies

3. Shell Programming and Scripting

Read contents of the file and print

AT ---------- 0 Elapsed: 00:00:00.02 SO ---------- 0 Elapsed: 00:00:00.01 SE ---------- 0 Elapsed: 00:00:00.01 CR ---------- (4 Replies)
Discussion started by: sandy1028
4 Replies

4. Shell Programming and Scripting

Read contents from a file

Hi Friends, I am new to this forum. Just struck up with a logic. I have a csv file seperated by ":" (colons). This csv file contains hostname and groups as follows: HOSTNAME:VT Group SGSGCT2AVPX001:Team1 SGSGCT2AVPX003:Team2 SGSGCT2AVPX005:Team2 PHMNCTTAVPX001:Team3 I want to... (2 Replies)
Discussion started by: dbashyam
2 Replies

5. Shell Programming and Scripting

script to read the contents of a file and print

Hi, Need help in writing a script to read the contents of this file test Test 00a 00b 00c 00d 00e 00f where it need to read each line to give a display such as form meta from dev 00a , config=Striped; add dev 00b:00f to meta 00a Can any one help me in writing this script (2 Replies)
Discussion started by: praveen1516
2 Replies

6. Shell Programming and Scripting

How to read contents of a file into variable :(

My file is in this format : username : student information : default shell : student ID Eg : joeb:Joe Bennett:/bin/csh:1234 jerryd:Jerry Daniels:/bin/csh:2345 deaverm: Deaver Michelle:/bin/bash:4356 joseyg:Josey Guerra:/bin/bash:8767 michaelh:Michael Hall:/bin/ksh:1547 I have to... (1 Reply)
Discussion started by: dude_me5
1 Replies

7. Homework & Coursework Questions

How to read contents of a file into variable :(

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I have to read the contents of each field of a file creating user accounts. The file will be of format : ... (6 Replies)
Discussion started by: dude_me5
6 Replies

8. Shell Programming and Scripting

how to read contents of file?

I have made a script something like this. I want it to read the contents of either file or directory but 'cat' and 'ls' is not working. Can anyone help me? I am a newbie in scripting so dont know much about it. I also dont know how can i put my code separatly on this forum #!/bin/bash echo... (9 Replies)
Discussion started by: nishrestha
9 Replies

9. Shell Programming and Scripting

read contents of a file using AWK

Hi, I am kind of new at awk programming, so any help would be great ! I am trying to read a date from a file into a variable and a count into another variable and display both these variables. The file looks like the attached file... I tried this but it doesn't work ... ... (6 Replies)
Discussion started by: RDR
6 Replies

10. Shell Programming and Scripting

Replace partial contents of file with contents read from other file

Hi, I am facing issue while reading data from a file in UNIX. my requirement is to compare two files and for the text pattern matching in the 1st file, replace the contents in second file by the contents of first file from start to the end and write the contents to thrid file. i am able to... (2 Replies)
Discussion started by: seeki
2 Replies
curs_scr_dump(3X)														 curs_scr_dump(3X)

NAME
scr_dump, scr_restore, scr_init, scr_set - read (write) a curses screen from (to) a file SYNOPSIS
#include <curses.h> int scr_dump(const char *filename); int scr_restore(const char *filename); int scr_init(const char *filename); int scr_set(const char *filename); DESCRIPTION
The scr_dump routine dumps the current contents of the virtual screen to the file filename. The scr_restore routine sets the virtual screen to the contents of filename, which must have been written using scr_dump. The next call to doupdate restores the screen to the way it looked in the dump file. The scr_init routine reads in the contents of filename and uses them to initialize the curses data structures about what the terminal cur- rently has on its screen. If the data is determined to be valid, curses bases its next update of the screen on this information rather than clearing the screen and starting from scratch. scr_init is used after initscr or a system [see system(BA_LIB)] call to share the screen with another process which has done a scr_dump after its endwin call. The data is declared invalid if the terminfo capabilities rmcup and nrrmc exist; also if the terminal has been written to since the preceding scr_dump call. The scr_set routine is a combination of scr_restore and scr_init. It tells the program that the information in filename is what is cur- rently on the screen, and also what the program wants on the screen. This can be thought of as a screen inheritance function. To read (write) a window from (to) a file, use the getwin and putwin routines [see curs_util(3X)]. RETURN VALUE
All routines return the integer ERR upon failure and OK upon success. NOTES
Note that scr_init, scr_set, and scr_restore may be macros. PORTABILITY
The XSI Curses standard, Issue 4, describes these functions (adding the const qualifiers). The SVr4 docs merely say under scr_init that the dump data is also considered invalid "if the time-stamp of the tty is old" but don't define "old". SEE ALSO
curses(3X), curs_initscr(3X), curs_refresh(3X), curs_util(3X), system(3S) curs_scr_dump(3X)
All times are GMT -4. The time now is 08:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy