Sponsored Content
Full Discussion: processing line in file
Top Forums Shell Programming and Scripting processing line in file Post 96508 by new2prog on Friday 20th of January 2006 01:26:07 PM
Old 01-20-2006
need help in almost a similar case

Hi ,
I am trying to write a script which picks up each entry ( list of Filesystems in a file ) from a file and then checks whether that Filesystem was backed up or not ?

# Script to check for the backups of some particular Filesystems backup status
cat <one f ile >
while q=$(line)
do
echo $q > FS
mminfo -c gbo472b -t yesterday | grep $FS
if [ $? -eq 0 ]
then
echo "$FS was backed up "
else
echo "$FS was not backed up"
fi
done

but it is not working ..pls let me know the problem.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File processing line by line

Hi, I am doing file processing line by line. while reading each line at a specified location I am searching for a particular character and then write that line to another file. Problem is while writing to another file it was supressing the spaces, which I don't want to do. Any help is... (1 Reply)
Discussion started by: suma
1 Replies

2. Shell Programming and Scripting

Reading a file line by line and processing for each line

Hi, I am a beginner in shell scripting. I have written the following script, which is supposed to process the while loop for each line in the sid_home.txt file. But I'm getting the 'end of file' unexpected for the last line. The file sid_home.txt gets generated as expected, but the script... (6 Replies)
Discussion started by: sagarparadkar
6 Replies

3. Shell Programming and Scripting

awk, perl Script for processing a single line text file

I need a script to process a huge single line text file: The sample of the text is: "forward_inline_item": "Inline", "options_region_Australia": "Australia", "server_event_err_msg": "There was an error attempting to save", "Token": "Yes", "family": "Family","pwd_login_tab": "Enter Your... (1 Reply)
Discussion started by: hmsadiq
1 Replies

4. Shell Programming and Scripting

reading a file inside awk and processing line by line

Hi Sorry to multipost. I am opening the new thread because the earlier threads head was misleading to my current doubt. and i am stuck. list=`cat /u/Test/programs`; psg "ServTest" | awk -v listawk=$list '{ cmd_name=($5 ~ /^/)? $9:$8 for(pgmname in listawk) ... (6 Replies)
Discussion started by: Anteus
6 Replies

5. Shell Programming and Scripting

[string processing]Adding new line in file

I have a report file which somewhere has a lines starting with word ".sub" I have a new variable named $new. What i am trying to do is insert the content of $new just before the occurrence of ".sub" in the report file. How can I do that? (11 Replies)
Discussion started by: animesharma
11 Replies

6. Shell Programming and Scripting

Line processing

If I have a line say like this 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 I want column 16 to be moved into column 4 and the rest same, like this 1 2 3 16 5 6 7 8 9 10 11 12 13 14 15 Using awk, I know that replacing $4 with $16 and typing all the column numbers will help. But, I have more... (4 Replies)
Discussion started by: jacobs.smith
4 Replies

7. Shell Programming and Scripting

[awk] line by line processing the same file

Hey, not too good at this, so I only managed a clumsy and SLOW solution to my problem that needs a drastic speed up. Any ideas how I write the following in awk only? Code is supposed to do... For every line read column values $6, $7, $8 and do a calculation with the same column values of every... (6 Replies)
Discussion started by: origamisven
6 Replies

8. Programming

awk processing / Shell Script Processing to remove columns text file

Hello, I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this : This is the output of ls command : I stored the output in a file filelist 1.1M... (5 Replies)
Discussion started by: ajayram
5 Replies

9. UNIX for Advanced & Expert Users

File Processing: Handling spaces in a line

Hi All, Iam trying to get a file processed and some lines have spaces...the below is not working Want to remove empty line Want to remove lines that start with # Avoid line with substring WHOA When trying to get the substring from the var also Iam having trouble file is like VAR=VALUE,... (13 Replies)
Discussion started by: baanprog
13 Replies
INITTODR(9)						   BSD Kernel Developer's Manual					       INITTODR(9)

NAME
inittodr -- initialize system time SYNOPSIS
#include <sys/types.h> #include <sys/systm.h> void inittodr(time_t base); DESCRIPTION
The inittodr() function determines the time and sets the system clock. It tries to pick the correct time using a set of heuristics that examine the system's battery backed clock and the time obtained from the root file system, as given in base. How the base value is obtained will vary depending on the root file system type. The heuristics used include: o If the battery-backed clock has a valid time, it is used. o If the battery-backed clock does not have a valid time, the time provided in base will be used. Once a system time has been determined, it is stored in the time variable. DIAGNOSTICS
The inittodr() function prints diagnostic messages if it has trouble figuring out the system time. Conditions that can cause diagnostic mes- sages to be printed include: o The battery-backed clock's time appears nonsensical. SEE ALSO
resettodr(9), time(9) BUGS
On many systems, inittodr() has to convert from a time expressed in terms of year, month, day, hours, minutes, and seconds to time, expressed in seconds. Many of the implementations could share code, but do not. Each system's heuristics for picking the correct time are slightly different. The FreeBSD implementation should do a better job of validating the time provided in base when the battery-backed clock is unusable. Cur- rently it unconditionally sets the system clock to this value. BSD
March 22, 1997 BSD
All times are GMT -4. The time now is 03:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy