Search Results

Search: Posts Made By: Kamesh G
3,561
Posted By Kamesh G
Can Someone help me in Understanding the below...
Can Someone help me in Understanding the below lines please???

awk '
NR == 1 {("stat -c%s " FILENAME) | getline SZ
SZ /= 8
FN = FILENAME "_" ++c;
...
17,949
Posted By Kamesh G
Making SED case insensitive
Dears,

In the below string, please let me know how to make the sed search case-incensitive. I have more such lines in my script instead of [Aa] let me know any other easier option.


sed -n...
2,750
Posted By Kamesh G
Syntax error near unexpected token
Dears,

While executing the below script im getting the error at line 30. Please let me know what changes to be done to fix this.

test.sh: line 30: syntax error near unexpected token `done'...
1,537
Posted By Kamesh G
Dears, Please let me know what is the way to...
Dears,

Please let me know what is the way to print the time taken to complete execution of the below script.

The below will run 8 parallel threads, would like to print the total time taken for...
1,537
Posted By Kamesh G
@bakunin - thank you for the help. one more query...
@bakunin - thank you for the help. one more query while the script runs. I'm getting the below

script:
for (( w=1; w <= 8; ++w ))
do
nohup ldapadd -x -c -h PL0 -p 389 -D...
1,537
Posted By Kamesh G
@jim mcnamara - One more query, I have a...
@jim mcnamara - One more query, I have a script.sh that waits for user input to begin. i.e. it has "read" in the script. Now im not able to log the script.sh out as when i do ./script.sh > out.log it...
1,537
Posted By Kamesh G
Executing statements inside forloop parallely
Hi All,

I have made a forloop as given below.

if [[ -f "serv_AAA_DS.ldif" && -s "serv_AAA_DS.ldif" ]]; then
echo -e "serv_AAA_DS.ldif file created and will be splitted into 8 smaller...
3,561
Posted By Kamesh G
RudiC thank you. I will try this I don't have the...
RudiC thank you. I will try this I don't have the access to the server now. I will try this. Thank you again

---------- Post updated 04-29-18 at 08:37 AM ---------- Previous update was 04-28-18 at...
3,561
Posted By Kamesh G
@vgersh99 - I really appreciate all the help,...
@vgersh99 - I really appreciate all the help, just want to ask one more thing.

Say my input file looks like below.
dn: serv=AAA,mscId=aaaaaa002aaaaaaaa426019001711495,ou=multiSCs,dc=btc...
3,561
Posted By Kamesh G
The sample I printed above was just an example I...
The sample I printed above was just an example I did manually in a text editor. I'm on a very armature level I was trying to split the file based on number of lines and split command but then it...
3,561
Posted By Kamesh G
@Rudic, sorry that my post was misleading. Are...
@Rudic, sorry that my post was misleading. Are you right, the input file should be split into 8 smaller files also maintaining the integrity of each chunk of lines in the input file.

-> Each of...
3,561
Posted By Kamesh G
@vgersh99, it worked, thank you for the help. ...
@vgersh99, it worked, thank you for the help.

the problem is the file split part is okay but the contents are not as expected, can you help with the command to create the output like sample_file1...
3,561
Posted By Kamesh G
Split large file into smaller files without disturbing the entry chunks
Dears,

Need you help with the below file manipulation. I want to split the file into 8 smaller files but without cutting/disturbing the entries (meaning every small file should start with a...
948
Posted By Kamesh G
@rdrtx1 thank you for the reply brother, can you...
@rdrtx1 thank you for the reply brother, can you also help me in describing what this awk attributes are doing I'm not very sound in this.
948
Posted By Kamesh G
Find and replace increament
Dears,

Can you help me with the below concern, I need one liner for this.

Input_file.txt
dn: asdf=yyyyyyyyyyyyy426019001711473,ou=multiSCs,dc=btc
asdf: yyyyyyyyyyyyy426019001711473...
683
Posted By Kamesh G
Search and incremental replace
Dears,

Can you help me with the below concern, I need one liner for this.

Input_file.txt
dn: asdf=yyyyyyyyyyyyy426019001711473,ou=multiSCs,dc=btc
asdf: yyyyyyyyyyyyy426019001711473...
2,336
Posted By Kamesh G
Help me understand this script
#!/bin/awk -f
BEGIN {i=1;file="modified.txt"}

{
if ($0 !~ /^DS:/) {print $0 >> file} else {
if ($0 ~ /^DS:/) {print "DS: ",i >> file;if (i==8) {i=1} else {i++}};
}
}

END {gzip...
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 03:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy