Sponsored Content
Full Discussion: Losing zero in while read
Top Forums Shell Programming and Scripting Losing zero in while read Post 302390887 by gefa on Friday 29th of January 2010 10:16:01 AM
Old 01-29-2010
Question Losing zero in while read

I'm using a while read statement to read in lines from a file, if a value (for example) is 1000.10 in a field, the last zero is removed leaving 1000.1 does anyone know a way to keep the field as it is in the original file?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

losing time

Hi all, The server seems to be losing time, not a lot, but enough to be noticed. UNIX AIX 4.3.3 Any ideas, Kathy (9 Replies)
Discussion started by: kburrows
9 Replies

2. Shell Programming and Scripting

Losing filename in grep output

I have the following line in a script that searches files in several directories and shows the search results on the screen. ls "$path" | xargs cat | tr -s " " | fgrep -i "$search_arg" But, because I'm also using CAT and TR, the output from the search does not display the name of the file... (6 Replies)
Discussion started by: netguy
6 Replies

3. UNIX for Dummies Questions & Answers

Losing ownership with gzip

I'm trying to sell the use of gzip instead of compress in our department. One issue I'm having (which is a showstopper) is that I lose the ownership when gzipping and gunzipping, though it's mentioned all over the web that files are supposed to keep ownership. Example: -rwxrwxrwx 1 ms32345 ... (3 Replies)
Discussion started by: superdelic
3 Replies

4. Solaris

Losing my solaris virginity

So here's the scoop. I am working on a project to automate the building of spark based solaris servers. I've got a cursory amount of knowledge of how to use the os after some pretty heavy experience with Linux, and doing a similar project there. I have a few questions though... 1) how is... (5 Replies)
Discussion started by: msarro
5 Replies

5. Shell Programming and Scripting

Losing quotes after redirection

Hello experts, Pleas I have written a shell script to build a parfile but I keep losing the quotes from query1 and query variables after the redirection.. How do I fix this ? PARFILE=${EXPDP_BASE}/expdp_${DAY}.par USERID=$(${ORACLE_BASE}/getpass.ksh SYSTEM opnlkp2.uk.ml.com)... (2 Replies)
Discussion started by: kamathg
2 Replies

6. Emergency UNIX and Linux Support

losing ESSID

Hey guys, facing a weird issue - hoping someone might be able to help. The wireless network on my laptop is configured with a static IP address. (not using nm) When i take the laptop out of the range (or i power the router down) the essid is becoming "off/any". When i'm back in range the... (6 Replies)
Discussion started by: moshe88
6 Replies

7. HP-UX

losing mail enroute

system is HP-UX B.11.23 U ia64 A standard feature of almost all of our cron jobs is to redirect output to a log file, then at the end of the script to embed the contents of that log file in the body of an email sent to the IT staff. Typical code to do this is $MAILER -s "$PROC: $SUBJECT"... (3 Replies)
Discussion started by: edstevens
3 Replies

8. Programming

Losing signal problem

I'm newbie in UNIX programming, I have a problem with signals. I'm writing multithread program, where threads can die at any moment. When thread dies it generates signal SIGUSR1 to main thread and then thread dies. Main thread gets a signal and waits for thread dead. I wrote program like this: ... (5 Replies)
Discussion started by: DendyGamer
5 Replies

9. Forum Support Area for Unregistered Users & Account Problems

Losing the connection

Hi. Recently when I'm logged in to site after some seconds, for instance, I lose the connection and need sign in again. It happens on Firefox and Chrome. Or another example, when I'm logged in to site and click on my nick name (right up corner) I lose the connection to site. User: tiago ... (0 Replies)
Discussion started by: Unregistered
0 Replies

10. UNIX for Dummies Questions & Answers

Losing Time

Our Unix system is losing a considerable amount of time each day, and our support service company says our motherboard is the cause. They "upgraded" us 5 years ago to basically the same thing as what we had previously, and are looking to "upgrade" us again now for about $5,000... I think... (23 Replies)
Discussion started by: Big Z
23 Replies
HEAD(1) 							   User Commands							   HEAD(1)

NAME
head - output the first part of files SYNOPSIS
head [OPTION]... [FILE]... DESCRIPTION
Print the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -c, --bytes=[-]K print the first K bytes of each file; with the leading `-', print all but the last K bytes of each file -n, --lines=[-]K print the first K lines instead of the first 10; with the leading `-', print all but the last K lines of each file -q, --quiet, --silent never print headers giving file names -v, --verbose always print headers giving file names --help display this help and exit --version output version information and exit K may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y. AUTHOR
Written by David MacKenzie and Jim Meyering. REPORTING BUGS
Report head bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report head translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for head is maintained as a Texinfo manual. If the info and head programs are properly installed at your site, the command info coreutils 'head invocation' should give you access to the complete manual. GNU coreutils 8.5 February 2011 HEAD(1)
All times are GMT -4. The time now is 04:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy