10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I've got this output:
# cat test2.txt
TM1ITP1-TMNLSTP1 SLC00=0,SLC01=0,SLC02=0,SLC03=0
if I just use cat test2.txt | tr "," "\n" I'll end up very near to what I'm trying to achieve:
TM1ITP1-TMNLSTP1 SLC00=0
SLC01=0
SLC02=0
SLC03=0
But how can i eventually add the term... (1 Reply)
Discussion started by: nms
1 Replies
2. Shell Programming and Scripting
Hello,
I'm looking to check only the first line of a file to see if it is a format string, like
# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -\*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2if the first line is anything else, insert the above string.
I'd... (3 Replies)
Discussion started by: f77hack
3 Replies
3. Shell Programming and Scripting
Hi
I need to write a Perl script that the file given as first argument of the command line that will find all occurrences of the string given as the third argument of the command line and replace with the string given as the fourth argument. Name newfound file is specified as the second... (3 Replies)
Discussion started by: nekoj
3 Replies
4. Shell Programming and Scripting
I have file like this
"copy table_name from filea.txt on node replace delimiter '|';"
"copy table_name from fileb.txt on node replace delimiter '|';"
"copy table_name from filec.txt on node replace delimiter'|';"
"copy table_name from filee.txt on node replace delimiter '|';"
"copy... (1 Reply)
Discussion started by: nnani
1 Replies
5. Shell Programming and Scripting
Hi All,
As mentioned in the title I have two text files and I would like to replace line number 5 of file #1 with line number 4 of file #2
e.g.
file 1
wqwert
4.4464002
3
319
286
369
46.320002
56.150002
45.100002
1
1
1
0.723 (12 Replies)
Discussion started by: f_o_555
12 Replies
6. Shell Programming and Scripting
Hi all
Is there a way to read and process a gzip file line by line similar to a text file without using gzcat..
while processing a text file we will usually use the logic
exec<sample.txt
while read line
do
echo $line
done
Is there a similar way to process the gz file in the same... (4 Replies)
Discussion started by: aikhaman
4 Replies
7. Shell Programming and Scripting
So, I want to read line-by-line a text file with unknown number of files....
So:
a=1
b=1
while ; do
b=`sed -n '$ap' test`
a=`expr $a + 1`
$here do something with b etc
done
the problem is that sed does not seem to recognise the $a, even when trying
sed -n ' $a p'
So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies
8. Shell Programming and Scripting
Hi all,
Very first post on this forums, hope you can help me with this scripting task.
I have a big text file with over 3000 lines, some of those lines contain some text that I need to replace, lets say for simplicity the text to be replaced in those lines is "aaa" and I need it to replace it... (2 Replies)
Discussion started by: Angelseph
2 Replies
9. Shell Programming and Scripting
Hello all
im trying to make daemon that listen for incoming textiles
and then it will move them to defined directory now the daemon part is ok
but im stack on how to check of file is close and done copied to directory .
so i could process it and move it forward
tnx (13 Replies)
Discussion started by: umen
13 Replies
10. Shell Programming and Scripting
I must remove hex characters 0A and 0D from several fields within an MS Access Table. Since I don't think it can be done in Access, I am trying here.
I am exporting a Table from Access (must be fixed length fields, I think, for my idea to work here) into a text format.
I then want to run a... (2 Replies)
Discussion started by: BAH
2 Replies