09-20-2008
Dear Tytalus, thanx for your quick reply.
I m new to unix n all, so can u plz tell me following things
1. Can we use "cat" option i.e. cat count.txt to assign that count value to variable x?
e.g
x=`cat count.txt`
2. Honestly i coulnt undrstnd this statement.
while [ $x -gt 1000 ]; do echo Splt -infl 20092008.txt -opfl 20092008_${y} -b $(expr $y \* 1000 + 1) -e $(expr $y \* 1000 + 1000); y=$(expr $y + 1); x=$(expr $x - 1000); done ; echo Splt -infl 20092008.txt -opfl 20092008_2 -b $(expr $y \* 1000 + 1) -e $(expr $y \* 1000 + $x)
Can u jst tell me, is the script smart enough to handle even if a particular file has n number of records? or it can handle only 3521 entries?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I've been working on getting a script to take size, dir name and file name variables from an input file and creating the same dir structure along with the file of specific size.
An example of the input file:
size/dirname/filename
2100/JAN_06/12345ABC.TCC
2354/FEB_06/24564XYZ.NOS... (2 Replies)
Discussion started by: nxd25
2 Replies
2. Shell Programming and Scripting
Hi Guys,
I have two dates as start date and end date.. i need to generate files within these two dates with time interval of half an hour....
i.e. Start Date=25/09/07 12:00:00
End Date=26/09/07 12:00:00
Now i need to generate files every half an... (0 Replies)
Discussion started by: aajan
0 Replies
3. Shell Programming and Scripting
Given that I have a log file of the format:
DATE ID LOG_LEVEL | EVENT
2009-07-23T14:05:11Z T-4030097550 D | MessX
2009-07-23T14:10:44Z T-4030097550 D | MessY
2009-07-23T14:34:08Z T-7298651656 D | MessX
2009-07-23T14:41:00Z T-7298651656 D | MessY
2009-07-23T15:05:10Z T-4030097550 D | MessZ... (5 Replies)
Discussion started by: daccad
5 Replies
4. Shell Programming and Scripting
Hi all,
Have to generate an xml having information related to files in the directory
Suppose i have file
file1.xml (datafile)
file2.xml (datafile)
file3.xml (metafile)
Now i need to generate an xml in the format >>
<?xml version="1.0" encoding="UTF-8"?>
<AuditFile Version="2.0">... (8 Replies)
Discussion started by: abhinav192
8 Replies
5. Shell Programming and Scripting
Hello:
First, I have no idea what to search for on this task, so I'll just spell it out.
I have the Bible in Audio format and each book is in a directory of it's own.
01 to 66 accordingly.
I need a script to walk through each of them and ls *.mp3 > directory|book.m3u without the preceding... (2 Replies)
Discussion started by: Habitual
2 Replies
6. Shell Programming and Scripting
On my website I host a lot of files, and when people view the site, currently each time the page loads, I have PHP generating the md5 sums for the files right then and there. It was fine when my site was small, but now that's obviously very inefficient. Now I'd like to start generating MD5 sums... (4 Replies)
Discussion started by: GrdLock
4 Replies
7. Shell Programming and Scripting
I have a script which generates recursively some files in folders for a given root folder.
I have checks for permissions and it works for all folders except one(i have 777 permission on it). When i try calling the script in problematic folder(problematic folder being root folder), script works as... (2 Replies)
Discussion started by: bb2
2 Replies
8. Shell Programming and Scripting
Hi,
I have a series of data files for which I wish to plot using "splot". Say, the files names are like:
950_data,951_data,952_data,......1000_data.
For one file , say to plot 950_data, i write following lines into a single file and load it in the gnuplot as :
gnuplot> load 'plot'
... (6 Replies)
Discussion started by: begin_shell
6 Replies
9. Shell Programming and Scripting
Hi All,
What am trying to do is generate the report by compating two files.
File A
-----------
111 22222 3333
222 55555 7777
File B
-----------
11A 22222 3333
333 55555 7778
Now the report should be as follows
Added:
333 55555 7778
Removed: (6 Replies)
Discussion started by: Prashantckc
6 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
May i please know how do i ensure my split command would NOT generate incomplete output files like below, the last lines in each file is missing some columns or last line is complete.
split -b 50GB File File_
File_aa
|551|70210203|xxxxxxx|12/22/2010 20:44:58|11/01/2010... (1 Reply)
Discussion started by: Ariean
1 Replies
TPING(1) LAM COMMANDS TPING(1)
NAME
tping - Send echo messages to LAM nodes.
SYNOPSIS
tping [-hv] [-c count] [-d delay] [-l length] nodes
OPTIONS
-h Print the command help menu.
-v Turn OFF verbose mode.
-c count Send count messages.
-d delay Delay delay seconds between each message.
-l length Each message is length bytes long.
DESCRIPTION
The tping command sends messages to, and collects replies from, a list of nodes, via the LAM echo server. It is similar to the UNIX
ping(8) command, and is used as a quick diagnosis of the LAM network.
Unless options are specified, tping sends a 1 byte message an infinite number of times, displaying the roundtrip time of each message as it
completes, with a delay of 1 second between roundtrips. After the loop is broken (with keyboard interrupt, eg: ^C), tping prints statis-
tics about all roundtrip messages.
EXAMPLES
tping h
Echo messages to the local node.
tping -v n7 -l 1000 -c 10
Echo 1000 byte messages to node 7. Stay silent while working. Stop after 10 roundtrips and report statistics.
BUGS
There is no built-in timeout and tping will wait forever to receive an echo. If no echo is received, due to a dead link or node, tping
hangs. Stop the process with a keyboard suspend signal (eg: ^Z) and terminate LAM with lamhalt(1) or lamwipe(1) (although the use of
lamwipe(1) is deprecated).
SEE ALSO
lamhalt(1), lamwipe(1)
LAM 7.1.4 July, 2007 TPING(1)