Search Results

Search: Posts Made By: kmanivan82
3,576
Posted By Scrutinizer
In bash - when used interactively - you need to...
In bash - when used interactively - you need to turn off history expansion/substitution: set +H
to keep the shell from interpreting the ! character within double quotes
1,011
Posted By RudiC
Try echo 'abc\USER DEFINED\123\345\adf\aq1' |...
Try
echo 'abc\USER DEFINED\123\345\adf\aq1' | sed 's/\\USER DEFINED\\/|/'
abc|123\345\adf\aq1
1,780
Posted By bartus11
You dont need cat here. Also, use double quotes: ...
You dont need cat here. Also, use double quotes:
Search_String=100
Replace_String=151
sed "s|${Search_String}|${Replace_String}|g" ${work}/temp_${CSV_File} > $work/${work_1}/${CSV_File}
2,367
Posted By balajesuri
Well, from what I gather, you want to create a...
Well, from what I gather, you want to create a broken tar file to test your script. Is that right? You could do a quick search and find out more pages like this one here...
962
Posted By Corona688
The first one reads the first line of the script,...
The first one reads the first line of the script, and uses it to decide which shell to use.

If it's #!/bin/ksh it will use KSH, if it's #!/usr/bin/csh it will use csh, if it's #!/bin/sh it will...
6,315
Posted By mjf
kmanivan82, To use RudiC's 2nd suggestion, try:...
kmanivan82,
To use RudiC's 2nd suggestion, try:
awk '{print $1".tmp"}' file_list.txt | xargs -n8 echo rm -f* remove echo once you have tested.

RudiC,
It doesn't appear your 1st suggestion will...
6,315
Posted By Don Cragun
You're right. But for the original problem: ...
You're right. But for the original problem:
while read A; do read B; read C; echo rm -r $A $B $C; done < filewould have worked.

With the new filename modification requirements, this approach...
6,315
Posted By RudiC
I'm afraid deleting 100000 files from a directory...
I'm afraid deleting 100000 files from a directory will take its time, esp. on a production system where other things are going on as well.
cding to the $workdir would not improve performance...
3,394
Posted By RavinderSingh13
Hello kmanivan82, Kindly use code tags...
Hello kmanivan82,

Kindly use code tags always for codes/commands/Inputs you are providing in your posts as per forum rules. Following may help you in same.

cat date_check1.ksh
echo $1 | awk...
4,683
Posted By methyl
What do you get from this command to list the...
What do you get from this command to list the contents of the tar file:
tar -tvf abc.tar
This will tell you whether you have absolute paths in the archive or not. None of the code you post would...
2,462
Posted By Chubler_XL
How about this, assumes each xml file begins with...
How about this, assumes each xml file begins with "<?xml"

awk '/^[0-9][0-9]*\,<\?xml/ {
FNUM++
gsub(/^[0-9]*\,/, "")
print $0 > "output" FNUM ".xml"
next
}
/.*,<\?xml/ {
...
1,801
Posted By itkamaraj
grep -v . sample.txt && echo "Invalid File" ||...
grep -v . sample.txt && echo "Invalid File" || echo "Valid File"


---------- Post updated at 09:01 AM ---------- Previous update was at 08:59 AM ----------

And if your grep supprot -m option,...
1,801
Posted By kshji
Next solution is answer for question "Which files...
Next solution is answer for question "Which files include empty lines or only spaces ?"

# line length 0 or line include only spaces
emptylines=$( grep -l -e "^$" -e "^ *$" *.txt )
for f...
1,801
Posted By itkamaraj
"^ .*" The above pattern will match " ...
"^ .*"


The above pattern will match " abc" also
1,155
Posted By ltomuno
chmod -f 664 $file3
chmod -f 664 $file3
Showing results 1 to 15 of 15

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