10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is it possible to replace a line of text within a file while it's closed with a single command or a script? Please show me an example or point me to a webpage that shows an example. The file has this line of text:
I want to replace it with the following:
... (2 Replies)
Discussion started by: wdg74
2. Shell Programming and Scripting
I need separate a file which is one huge line to multiple lines based on certain number of charactors. for example:
abcdefghi high abaddffdd
I want to separate the line to multiple lines for every 4 charactors.
the result should be
Thanks in... (5 Replies)
Discussion started by: ken6503
3. Shell Programming and Scripting
I am trying to write a code, where it reads the jobnames from a file and checks for the logs in the server. If the log is not found in the first server, then it will ssh to the 2nd server and get the details from there. I will need to save the date in a variable.
But the problem is that,... (0 Replies)
Discussion started by: ajayakunuri
4. UNIX for Dummies Questions & Answers
I just upgraded one my server to latest version RHEL, I have many users who will do SSH from another server. I wanted to update all of the users home directory and remove the security key. For example.
/home/XYZ/.ssh/known_hosts and remove this hostsname.
Please see below and advise.... (2 Replies)
Discussion started by: samnyc
5. Shell Programming and Scripting
I am a perl newbie. I hope you will be patient with me.
I have a script that needs to be written in perl. I can't do it in awk or shell scripting.
Here is the script:
use POSIX qw(strftime);
use IO::Handle;... (0 Replies)
Discussion started by: brianjb
6. Shell Programming and Scripting
I have a line which has n number of words with separated by space.
I wanted to make each word as a separate line.
i have a file that has line like
i am a good boy
i want the output like,
good (8 Replies)
Discussion started by: rbalaj16
7. Shell Programming and Scripting
I got an XML file(file name TABLE.xml) which the data format has line breaks(with no Spaces, no Nulls, no characters between each line), I need to write a KSH script which gives me the data in single line as format shown below
My input file which have line breaks:
<S_NO>... (7 Replies)
Discussion started by: pred55
8. Shell Programming and Scripting
i have two files as
and the output should be:
3~c (1 Reply)
Discussion started by: mlpathir
9. Shell Programming and Scripting
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
while read line
Is there a similar way to process the gz file in the same... (4 Replies)
Discussion started by: aikhaman
10. Shell Programming and Scripting
So, I want to read line-by-line a text file with unknown number of files....
while ; do
b=`sed -n '$ap' test`
a=`expr $a + 1`
$here do something with b etc
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