10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The following code will split the infile into multiple files. However, I need it to insert the same first 3 lines from the original input file into each splitted file. How do I modify my script below to do so:
print -n "Enter file name to split? " ; read infile
if
then
echo "Invalid file... (4 Replies)
Discussion started by: mrn6430
4 Replies
2. Shell Programming and Scripting
Can we input two variable on single line that separate by space example user input "list jpg" it will list all jpg files in current directory (3 Replies)
Discussion started by: guidely
3 Replies
3. Shell Programming and Scripting
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies
4. Shell Programming and Scripting
Hi all,
I wanted to split a single line into two line.
For example:
A/B/C 10
i want this output
var1 = A/B/C
var2 = 10
How do i get this. (2 Replies)
Discussion started by: ch33ry
2 Replies
5. Shell Programming and Scripting
Hi all,
My search karate must be weak because I'm about certain something very like this has been asked and answered here many times. I'll give you the exact scenario I've wasted a few hours of my Saturday on: :wall:
I'm trying to read through a very large number (~200) of router and... (28 Replies)
Discussion started by: svermill
28 Replies
6. Shell Programming and Scripting
Hi Gurus,
I need to cut single record in the file(asdf) to multile records based on the number of bytes..(44 characters). So every record will have 44 characters. All the records should be in the same file..to each of these lines I need to add the folder(<date>) name.
I have a dir. in which... (20 Replies)
Discussion started by: ram2581
20 Replies
7. Shell Programming and Scripting
Let's assume that I have a file name called ‘A' and it has 100 lines in it and would like to split these 100 lines into 4 files as specified bellow.
INPUT: Input file name A
1
2
3
4
5
6
7
8
9
........100
Output: 4 output files (x,y,z,w)
File x should contains (Skip 4 lines)... (15 Replies)
Discussion started by: subbarao25
15 Replies
8. Shell Programming and Scripting
Dear All,
I want to split single line into two line or three lines wherever “|” separated values comes using
Input line
test,DEMTEMPUT20100404010012,,,,,,,,|0070086|0070087,
output shoule be
test,DEMTEMPUT20100404010012,,,,,,,,0070086,
test,DEMTEMPUT20100404010012,,,,,,,,0070087, (14 Replies)
Discussion started by: arvindng
14 Replies
9. Shell Programming and Scripting
It sounds a bit confusing but what I have is a text file like the example below (without the Line1, Line2, Line3 etc. of course) and I want to move every group of characters into a new line after each space.
Example of text file;
line1 .digg-widget-theme2 ul { background: rgb(0, 0, 0) none... (7 Replies)
Discussion started by: lewk
7 Replies
10. Shell Programming and Scripting
hey gents,
I'm working on something that will use snmpwalk to query the devices on my network and retreive the device name, device IP, device model and device serial. I'm using Nmap for the enumeration and sed to clean up the results for use by snmpwalk. Once i get all the data organized I'm... (8 Replies)
Discussion started by: mitch
8 Replies