10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Like I have below string
XX_49154534_491553_201_122023_D
XX_49159042_491738_201_103901_D
and the expected output would be
0154534
0159042
XX and 49 can be dynamic. (1 Reply)
Discussion started by: nadeemrafikhan
1 Replies
2. Post Here to Contact Site Administrators and Moderators
In file, we have millions of records each of 1000 in length. And at specific position say 800 there is a space, we need to replace it with Character X if the ID in that row starts with 123.
So far i have used the below which is replacing space at that position to X but its not checking for... (3 Replies)
Discussion started by: Jagmeet Singh
3 Replies
3. Shell Programming and Scripting
Hi,
I am having a files in my directory like this:
2014 1049_file1.txt
2014 1050_file2.txt
2014 1110_file3.txt
2014 1145_file4.txt
2014 2049_file5.txt
I need to replace the above file names like this without changing the content of filename:
file1.txt
file2.txt
file3.txt... (10 Replies)
Discussion started by: rohit_shinez
10 Replies
4. Shell Programming and Scripting
I must design a UNIX script to monitor files whose size is over a threshold of 5 MB in a specific UNIX directory
I meet a problem during the for loop in my script. Some file names contain spaces.
ls -lrt | awk '$5>=5000000 && length($8)==5 {gsub(/ /,"_",$9); print};'
-rw-r--r-- 1 was61 ... (2 Replies)
Discussion started by: Scofield38
2 Replies
5. Shell Programming and Scripting
how to replace the 3rd colum? Each line begins similarly, but they all ends variously.
XX YY 03 variable text here
XX YY 03 more variable text here
XX YY 03 even more variable text here really long setence
XX YY 03 variable numbers also appear 03 11. 123 456
XX YY 03 the occasional comma,... (4 Replies)
Discussion started by: ajp7701
4 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I'm hoping you can help.. I've used this forum a couple of times and I am back again now i've moved onto something more complex (for me!)
I have some data which looks like:
"AL1_1,AL1_1,"
"AL1_1.AL1_1A.AL1_1AE,AL1_1AE,"
"AL1_1.AL1_1A.AL1_1AG,AL1_1AG,"
"AL1_1.AL1_1A.AL1_1AJ,AL1_1AJ,"... (10 Replies)
Discussion started by: gman
10 Replies
7. Shell Programming and Scripting
trying to remove the portion in red:
Data:
mds_ar/bin/uedw92wp.ksh: $AI_SQL/wkly.sql
mds_ar/bin/uedw92wp.ksh: $EDW_TMP/wkly.sql
output to be:
mds_ar/bin/uedw92wp.ksh: wkly.sql
mds_ar/bin/uedw92wp.ksh: wkly.sql
SED i'm trying to use:
sed 's/:+\//: /g' input_file.dat >... (11 Replies)
Discussion started by: danmauer
11 Replies
8. Shell Programming and Scripting
I am searching while I await a response to this so if it has been asked already I apologize.
I have a file with lines in it that look like:
bob johnson email@email.org
I need it to look like:
bob:johnson:email@email.org
I am trying to use sed like this:
sed -e 's/ /:/g' file >... (5 Replies)
Discussion started by: NewSolarisAdmin
5 Replies
9. Shell Programming and Scripting
Hi ,
How to replace all entries of comma in text file by space or other character.
cat temp.txt
A,B,C,D
I want this file to be like
A B C D
Please help!!! (4 Replies)
Discussion started by: prashant43
4 Replies
10. Shell Programming and Scripting
Hi
I have a file which have say about 100,000 records..
the records in it look like
Some kind of text 1234567891 abcd February 14, 2008 03:58:54 AM lmnop
This is how it looks.. if u notice there is a 2byte space between each column.. and im planning to replace that with '|' ..
... (11 Replies)
Discussion started by: meghana
11 Replies