10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I use this to get 8 random letters:
cat /dev/urandom | tr -dc 'A-Z' | fold -w 8 | head -n 1
Result is,
WLGFJFZY
What I'm trying to do is get 10 lines of random letters, separated by a line and each block having ascending numbers
i.e;
00
IWMTDFIM
01
KZZZCHPQ
02
YBTGFHGT
03 (4 Replies)
Discussion started by: jenny-mac
4 Replies
2. UNIX for Beginners Questions & Answers
I am using below code to split files based on blank lines but it does not work.
awk 'BEGIN{i=0}{RS="";}{x="F"++i;}{print > x;}'
Your help would be highly appreciated
find attachment of sample.txt file (2 Replies)
Discussion started by: imranrasheedamu
2 Replies
3. Shell Programming and Scripting
Hi All,
I am stuck in one step..
I have one file named file.txt having content:
And SGMT.perd_id = (SELECT cal.fiscal_perd_id FROM $ODS_TARGT.TIM_DT_CAL_D CAL
FROM $ODS_TARGT.GL_COA_SEGMNT_XREF_A SGMT
SGMT.COA_XREF_TYP_IDN In (SEL COA_XREF_TYP_IDN From... (4 Replies)
Discussion started by: Shilpi Gupta
4 Replies
4. Shell Programming and Scripting
Hi,
I need help to split any lines that contain ; or ,
input.txtAc020 Not a good chemical process
AC030 many has failed, 3 still maintained
AC040 Putative; epithelial cells
AC050 Predicted binding activity
AC060 rodC Putative; upregulated in 48;h biofilm vs planktonic
The output... (8 Replies)
Discussion started by: redse171
8 Replies
5. 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
6. 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
7. Shell Programming and Scripting
Guys I am having a problem with being able to find missing monitors in a configuration check script I am trying to create for accountability purposes for managing a large number of systems. What I am trying to do is run a script that will look at the raw config data in a file and pull all the pool... (7 Replies)
Discussion started by: scottzx7rr
7 Replies
8. Shell Programming and Scripting
Hi guys, looking for a bit of advise, and as I am a complete novice, please excuse the daft questions!!
I have a list of events and of which entry looks like this;
#
# Event 1
# NAME = Event 1
#
12345 : 123 : 1 : 1 : L,1,N : 1,0 : Event
#
# Event 2
# NAME = Event 2
#
12346... (8 Replies)
Discussion started by: JayC89
8 Replies
9. UNIX for Dummies Questions & Answers
All,
I have a requirement where I will need to split a line into multiple lines.
Ex:
Input:
2ABCDEFGH2POIYUY2ASDGGF2QWERTY
Output:
2ABCDEFGH
2POIYUY
2ASDGGF
2QWERTY
The data is of no fixed lenght. Only the lines have to start with 2.
How can this be done. (5 Replies)
Discussion started by: kingofprussia
5 Replies
10. Shell Programming and Scripting
Hello ,
I'm trying to split a file which contains a single very long line.
My aim is to split this single line each 120 characters.
I tried with the sed command :
`cat ${MYPATH}/${FILE}|sed -e :a -e 's/^.\{1,120\}$/&\n/;ta' >{MYPATH}/${DEST}`
but when I wc -l the destination file it is... (2 Replies)
Discussion started by: jerome_1664
2 Replies