10 More Discussions You Might Find Interesting
1. 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-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
2. Shell Programming and Scripting
I want to write a small code in which script changes command line input to some form.
script.sh a1 a2 a3 a4 .....
output should be "a1|a2|a3|....."
Number of inputs in command line can be any variable (2 Replies)
Discussion started by: Raza Ali
3. Shell Programming and Scripting
I need a script to take the filename of every file in a directory and substitute that file name for whatever is on the first line of the file. There may or may not be anything on the line, but I want the line to be the same as the file name. Most of the script tools I have used are non-destructuve,... (14 Replies)
Discussion started by: LMHmedchem
4. Shell Programming and Scripting
I have a input files as below.
Sample of one input file
type mtg_key =
type psl_key =
utf8 string("\344") st_cd;
type amk_fields =
... (6 Replies)
Discussion started by: adgangwar
5. Shell Programming and Scripting
I'm working on a script to make automatic the new releases of my website...
However in this script I put all the css script in a single one. There's no rpoblem for that.
My problem is when I want to change the header of my layout page to put instead of :
$header.="<link rel=\"stylesheet\"... (2 Replies)
Discussion started by: lahabana
6. Shell Programming and Scripting
Let say in a file I have lines of data like this :
I... (3 Replies)
Discussion started by: luna_soleil
7. Shell Programming and Scripting
i have a line
tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd /tftpboott
in /etc/inet.conf file. ineed to replace nobody with root and /tftpboott with /flx/boot. i tried using sed ,but i could not change both of them. can you please help me to do this.
Edit:... (7 Replies)
Discussion started by: vprasads
8. Shell Programming and Scripting
Suppose I have a file. The content of the file is:
What I want to do is: if "STH" = "YES", do not change it, otherwise, change it to "YES". e.g.
change it to be
do not change the file.
... (2 Replies)
Discussion started by: lilili07
9. Shell Programming and Scripting
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
10. UNIX for Dummies Questions & Answers
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