10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have two files
fileA
HEADER LINE A
CommentLine A
Content A
....
....
....
TAILER AfileB
HEADER LINE B
CommentLine B
Content B
....
....
....
TAILER BI want to merge these two files as
HEADER LINE A
CommentLine A
Content A (4 Replies)
Discussion started by: sam05121988
4 Replies
2. Programming
I have a script I am trying to test and run but it runs against a jar file. I wrote an external property file so it would redirect with my script, but it keeps going in search of the previous property file. Is there any way to externally over write the jar file and if not how do you go about... (7 Replies)
Discussion started by: risarose87
7 Replies
3. Shell Programming and Scripting
Hi All,
I have a file which has hundred of records with fixed number of fields. In each record there is set of 8 characters which represent the duration of that activity. I want to sum up the duration present in all the records for a report. The problem is the duration changes per record so I... (5 Replies)
Discussion started by: danish0909
5 Replies
4. Red Hat
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Discussion started by: cielle
6 Replies
5. Shell Programming and Scripting
Hi Experts,
I want to alter two filed of my data file: The _new should come to 2nd column, and _new to be removed from 4rth column, please advise,
datafile.txt
aa /dev/vgAA/lvol1 bb /dev/vgAA_new/lvol1
aa /dev/vgAA1/lvol2 bb /dev/vgAA1_new/lvol2
aa /dev/vgAC/lvol1 bb... (5 Replies)
Discussion started by: rveri
5 Replies
6. Shell Programming and Scripting
Hi all,
I have a variable say var1 (output from somewhere, which I can't change)which store something like this:
echo $var1
name=fred
age=25
address="123 abc"
password=pass1234
how can I make the variable $name, $age, $address and $password contain the info?
I mean do this in a... (1 Reply)
Discussion started by: freddy1228
1 Replies
7. SuSE
Dear all,
we are running SLES 11 where an iscsi tape library is
attached. To load the tape in a slot we are using for
instance the command #mtx -f /dev/sg1 load 2 which is doing
very well.
But after a server's reboot the device name of the loader is now
/dev/sg4 or /dev/sg5 I mean it is... (1 Reply)
Discussion started by: xunil321
1 Replies
8. Shell Programming and Scripting
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies
9. Shell Programming and Scripting
I want to change a number in a file into number -1..
for instance
file_input is
fdisdlf_s35
fdjsk_s27
fsdf_s42
jkljllljkkl_s57
... etc
now i want the output to be
fdisdlf_s34
fdjsk_s26
fdsf_s41
jkljllljkkl_s56
... etc
I was think of using "sed -e 's/2/1/g' -e 's/3/2/g' -e... (4 Replies)
Discussion started by: bigboizvince
4 Replies
10. Shell Programming and Scripting
I have an inventory program that I would like to have the ability to go and change or alter the field data based on the item number as a key. I have the menu option set but at the end of the script process it just appends the changed data to the database rather than what I would like; which is to... (5 Replies)
Discussion started by: stlitguru
5 Replies