9 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. Shell Programming and Scripting
Hi, if i have data like below:
Control|AC-00011-CN-2475208 AC-00011-CN-2475211 AC-00007-CN-2475238 AC-00007-CN-2475241
Im getting output in required format as below
Control|AC-00011-CN-2475208
Control|AC-00011-CN-2475211
Control|AC-00007-CN-2475238
Control|AC-00007-CN-2475241
using
awk... (9 Replies)
Discussion started by: JSKOBS
9 Replies
3. Shell Programming and Scripting
Hi Everyone,
Im currently using the below code to pull data from a large CSV file and put it into smaller files with just the data associated with the number that I "grep".
grep 'M053' test.csv > test053.csv
Is there a way that I can use grep to run through my file like the example below... (6 Replies)
Discussion started by: TheStruggle
6 Replies
4. 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
5. UNIX for Dummies Questions & Answers
Hi,
I'm trying to get lines from a file using identifiers in the first two columns. I have used:
cat MasterFile.txt | grep -f Pattern.txt
and the lines I want display on screen. If I try to put them in a file the file is created but stays empty:
cat MasterFile.txt | grep -f Pattern.txt... (14 Replies)
Discussion started by: FGPonce
14 Replies
6. Shell Programming and Scripting
echo "please enter ur choice..
1. Make a file.
2. Display contents
3. Copy the file
4. Rename the file
5. Delete the file
6. Exit"
read choice
case $choice in
1 ) echo enter the file name
read fname
if
then
echo... (2 Replies)
Discussion started by: gotam
2 Replies
7. 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
8. Shell Programming and Scripting
I have a file with a set of insert statements some of which have a single column value that crosses multiple lines causing the statement to fail in sql*plue. Can someone help me with a sed script to replace the new lines with chr(10)?
here is an example:
insert into mytable(id, field1, field2)... (3 Replies)
Discussion started by: jjordan
3 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