10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Objective is to substitute Jan with 01, Feb with 02 and so on. The month will be provided as input.
I could construct below awk and it worked.
echo Jun | \
awk 'BEGIN{split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec",mon," ")}{ for (i=1;i<=12;i++){ if ($1==mon) printf("%02d\n",i)} }'
... (4 Replies)
Discussion started by: krishmaths
4 Replies
2. UNIX for Dummies Questions & Answers
Hello People,
I have got a requirement to count the number of duplicate alternate Indexes present in a C-ISAM/IDXFORMAT(8) file.
Is there any utility that can furnish this information for the file? I am in need of the Alternate Index value and the number of times it appears as Alternate... (3 Replies)
Discussion started by: sriky86
3 Replies
3. Shell Programming and Scripting
I would like to extract a digit from $0 starting 2,30 to 3,99 or 2.30 to 3.99
Can somebody fix this?
awk --re-interval '{if($0 ~ /{1}{2}/) {print FILENAME, substr($0,index($0,/{1}{2}/) , 4)}}'input
abcdefg sdlfkj 3,29 g. lasdfj
alsdfjasl 2.86 gr. slkjds sldkd
lskdjfsl sdfkj kdjlksj 3,34 g... (4 Replies)
Discussion started by: sdf
4 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I have a file with over 100,000 lines. I would like to be able extract 5000 lines at a time and give it as an input to another program.
sed -n '1,5000p' <myfile> > myOut
Similarly for
5001-10000
10001-15000
....
How can I do this in a loop?
Thanks,
Guss (5 Replies)
Discussion started by: Gussifinknottle
5 Replies
5. Shell Programming and Scripting
Hi,
I need to basically get a list of all the tarballs located at uri
I am currently doing a wget on urito get the index.html page
Now this index page contains the list of uris that I want to use in my bash script.
can someone please guide me ,.
I am new to Linux and shell scripting.
... (5 Replies)
Discussion started by: mnanavati
5 Replies
6. Emergency UNIX and Linux Support
Hi ,
I have a huge file like this
=245 this is testing
=035 abc123
=245 this is testing1
=035 abc124
=245 this is testing2
=035 abc125
=035 abc126
=245 this is testing3
here i have to pull out those lines having two =035 instead of alternative 035 and 245 i.e extract... (18 Replies)
Discussion started by: umapearl
18 Replies
7. Shell Programming and Scripting
This is my problem, my file (file A) contains the following information:
Now, I would like to create a file (file B) containing only the lines with 10 or more characters but less than 20 with their corresponding ID:
Then, I need to compare the entries and determine their frequency. Thus, I... (7 Replies)
Discussion started by: Xterra
7 Replies
8. Shell Programming and Scripting
Hi
I want to extract certain text between two line numbers like
23234234324 and
54446655567567
How do I do this with a simple sed or awk command?
Thank you.
---------- Post updated at 06:16 PM ---------- Previous update was at 05:55 PM ----------
found it:
sed -n '#1,#2p'... (1 Reply)
Discussion started by: return_user
1 Replies
9. Shell Programming and Scripting
Hi All,
I am new to this shell scripting world. Struck up with a problem, can anyone of you please pull me out of this.
Requirement : Need to get the index of a substring from a parent string
Eg : index("Sandy","dy") should return 4 or 3.
My Approach :
I used Awk function index to... (2 Replies)
Discussion started by: sandeepms17
2 Replies
10. UNIX for Dummies Questions & Answers
Well, i have a little problem here.
I am given device "console" of symbolical type.
I do need to get its driver's number (index ?)
Your help would be greatly appreciated
thx,
axujet (1 Reply)
Discussion started by: axujet
1 Replies