10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi,
I'm trying to grep content from one file in another file.
The file that I'm searching into is large and hence I need to temporarily unzip it first.
gzip -dc ALL.chr2.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz | grep '169997024\|190670539\|128051369' >... (2 Replies)
Discussion started by: janshamsani
2 Replies
2. Shell Programming and Scripting
HI,
I have File1 which contains :-
admins = anand,satheesha,user1,user2,user3,user4,user5,user10,vishal
nonadmins = read-only
@admins = rw
@nonadmins = r
One shell script, using that I want to change the File1 as per user input (let's say $1) which have value as 'John', so now I want to... (6 Replies)
Discussion started by: Vishal Mishra
6 Replies
3. Shell Programming and Scripting
Dear Unix Gurus,
I am new to shell scripting and in the process of learing.
I am trying to find whether a file name has today's date in MMDDYYYY format.
I am using the following code and it doesn't seem like working.
#!/usr/bin/ksh
today=$(date '+%m%d%Y')
echo today: $today
file=`find... (4 Replies)
Discussion started by: shankar1dada
4 Replies
4. Shell Programming and Scripting
Hi,
I have searched through this forum as there are many similar entries but could'nt get one of them to work, either that or they were just different to what I needed.
Basically I have a file, recordsDatabase. In this file are a few different fields. There is a unique identifier eg 001... (5 Replies)
Discussion started by: U_C_Dispatj
5 Replies
5. UNIX for Dummies Questions & Answers
Hi guys, I am a newbie here :wall:
I need a script that can search for a file in a directory and copy the contents of that file in a new file.
Please help me. :confused: Thanks in advance~ (6 Replies)
Discussion started by: zel2zel
6 Replies
6. Shell Programming and Scripting
I want to search a file in a specific location and I don't want to use find command.
I want to give the path also where the file is for searching it. Pls help (3 Replies)
Discussion started by: maitree
3 Replies
7. Shell Programming and Scripting
Hi ,
i am writing a script in which i am using following command to grep some string and then storing it's output to v, as like below :-
v=$(awk -F, '{ if ( $NF ~ /DEV/ ) print $0 "_BLD01";else print $0 "_RC01" }' mytest)
Here i am facing following issues:-
1. it is searcing DEV in the... (1 Reply)
Discussion started by: inderpunj
1 Replies
8. Shell Programming and Scripting
Looking for a bit of help. I need to search for a string of words, but unfortunately these words are located on separate lines.
for example the text output is:
United
Chanmpions
Ronaldo
Liverpool
Losers
Torres
and my script code is
print("DEBUG - checking file message");
while... (15 Replies)
Discussion started by: meevagh
15 Replies
9. Shell Programming and Scripting
Can you please help me to edit parts of a file and write into a new file.
=====================================
Suppose I have a huge data dump in a file I need to search for a tag in that and cut few lines around that tag in the file. Is there a way to keep track of line numbers and operate on... (18 Replies)
Discussion started by: jayana
18 Replies
10. UNIX for Advanced & Expert Users
Is there a way a command or a combination through which i can check the contents of a all files in a directory and get the return as the file names which contains the partiuclar string. (2 Replies)
Discussion started by: thepitzaboy
2 Replies