10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Gurus,
I have below file which has different sections, need to move the sections to beginning of the each record.
original file
aaa
bbb
ccc
ddd
eee
fff
output file.
aaa
bbb
ccc
ddd
eee
fff (6 Replies)
Discussion started by: green_k
6 Replies
2. UNIX for Beginners Questions & Answers
I have a log file, which i have divided into 14 files using csplit, the file looks like below
test-000000
test-000001 #and so on until 14
now I want all the 14 files generated to be renamed as the some part of test in first line of the file how can i eliminate the unwanted text?
sample... (5 Replies)
Discussion started by: Sekhar419
5 Replies
3. Shell Programming and Scripting
Hi,
I want to achieve something similar to what described in another post:
The difference is I want to add the line if the pattern is not found.
File 1:
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
... (11 Replies)
Discussion started by: jyu3
11 Replies
4. Shell Programming and Scripting
Hello all,
I have a line of code in a file that I need to change in the /etc/sysconfig/kdump file
presently the line reads:
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off"
what I need to do is put a comment out the 1st line and repeat it, and... (5 Replies)
Discussion started by: gartie
5 Replies
5. Shell Programming and Scripting
Hi Guys,
I have file A.txt
File A Data
AK1521
AK2536
AK3164
I want create text file of all data above and write some data on each file.
want Output on below folder
/home/kka/out
AK1521.txt
Hi
Welocme (3 Replies)
Discussion started by: asavaliya
3 Replies
6. Shell Programming and Scripting
Hi,
I have a input files as below.
Sample of one input file
type mtg_key =
record
decimal("\344") id;
string("\344") ct_cd;
string("\344") st_cd;
end;
type psl_key =
record
decimal("\344") id;
utf8 string("\344") st_cd;
end;
type amk_fields =
record
... (6 Replies)
Discussion started by: adgangwar
6 Replies
7. Shell Programming and Scripting
hello,
I have problem with writing/adjusting a shell script.
I searched forum and unfortunately couldn't write scipt based on the information I found.
I never wtire such so it's hard for me and I do need to modify one script immediately.
case looks like:
1. 'file' that needs to be modified... (3 Replies)
Discussion started by: bipbip
3 Replies
8. Shell Programming and Scripting
Suppose I have a file. The content of the file is:
Fwf33
#enable_a STH.
fwqfw
egvega
What I want to do is: if "STH" = "YES", do not change it, otherwise, change it to "YES". e.g.
if
“enable_a ERR”
change it to be
“enable_a YES”
if
“enable_a YES”
do not change the file.
... (2 Replies)
Discussion started by: lilili07
2 Replies
9. Shell Programming and Scripting
Hi,
I'm struggling to write a script to do the following,
-will go through each line in the file
-in a specific character positions, changes
the value to a new value
-These character positions are fixed througout the file
-----------------------
e.g.: file1.sh will have the following 3... (4 Replies)
Discussion started by: vini99
4 Replies
10. UNIX for Dummies Questions & Answers
Hi everyone,
I am attempting to do something that should be very simple. How do I replace a specific line of a file with different text, and then save that file to its original name? I believe I want to use the sed command with the c option, but I after trying many times, I can't get the right... (10 Replies)
Discussion started by: msb65
10 Replies