10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
This is actually a KSH under Unix System Services (Z/OS), but hoping I can get a standard AIX/KSH solution to work...
I have a very large, single line file in Windows, that we download via FTP, with the "SITE WRAP" option, into a Z/OS file with an LRECL of 200. This essentially breaks the single... (4 Replies)
Discussion started by: bubbawuzhere
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I'm trying make a variable length file to a fixed length of 4000.
I'm to pad spaces on the right of a record if length is less than 4000 to make the record length 4000.
I'm trying to use the below commands
awk '{printf "%-4000s\n", $0}' inputfile.dat > outputfile.dat
sed -e :a... (12 Replies)
Discussion started by: uxusr
12 Replies
3. UNIX for Dummies Questions & Answers
Ksh is my default shell, but I want use the bash shell since its convenient to me.
When I type a long command line in a terminal, it does not wrap to the next line when I reach the end of the line and it wraps onto the same line, overwriting my prompt and the rest of what I typed.
$... (5 Replies)
Discussion started by: senthil.ak
5 Replies
4. Shell Programming and Scripting
When a file generated by a shell script is sent as a mail (not as an attachment), in MS Outlook, single lines of the file are displayed as two/three lines (as the lines are long). Is there a way to make each line to be displayed in 'single line with scroll bar' to enable viewing of the long line? (2 Replies)
Discussion started by: thulasidharan2k
2 Replies
5. Shell Programming and Scripting
When a file generated by a shell script is sent as a mail (not an attachment), in MS Outlook, single lines of the file are displayed as two/three lines (as the lines are long). Is there a way to make each line to be displayed in 'single line with scroll bar' to enable viewing of the long line?
... (0 Replies)
Discussion started by: thulasidharan2k
0 Replies
6. Shell Programming and Scripting
For people who want to pull a number of lines from a long file using a specific formula
n (number of iterations in a loop)
a (offset number)
b (stretch factor)
example with n {1..100}
for (( n=1; n<101; n++ )); do awk -v n=$n 'NR==a+(b*n)' a=0 b=1 inputfile >>outputfile (2 Replies)
Discussion started by: sgruenwald
2 Replies
7. Shell Programming and Scripting
I have a awk script called test.awk which I run using
awk -f test.awk file1.txt > file2.txt
I am doing a long print statement and want to put it in separate lines
Do I need a '/' at the end or not?????
Should it be like this
print... (12 Replies)
Discussion started by: kristinu
12 Replies
8. Shell Programming and Scripting
I'm using a barcode scanner to grab ISBNs. Unfortunately, short of hitting "enter" each time (not easy while on a ladder), there's no good way to split it up. So I scanned it into a series of long lines in notepad.
Now, I need to split each line into 12-number lines.
instead of:... (4 Replies)
Discussion started by: mbourgon
4 Replies
9. UNIX for Dummies Questions & Answers
Hi Gurus,
I have a big file having around 5000 lines. What I need to do is as below.
$cat myfile
aaaa
bbbb
ccc
ddd
...
I want the output to be as below:
'aaaa,'bbbb','cccc'....
For this I have written something like this
code:
vi sac.txt |nawk '{printf NR","}'>ss
code: (2 Replies)
Discussion started by: thana
2 Replies
10. UNIX for Dummies Questions & Answers
HI, i need to remove about a 3000000 lines in a "too long file", without using vi editor. Im using hp-ux 11.0. (4 Replies)
Discussion started by: Goodfella
4 Replies